aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/dirty_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Cleaning up ActiveModel::Dirty testsAttila Domokos2013-01-151-1/+12
| | | | | | | * Clarifying what the #changed method returns * Adding tests to describe what the #changed_attributes returns * Updating test name based on pull request comment * Moving the test lower in the file per pull request comment
* Reset attributes should not report changes.Renato Mascarenhas2012-12-011-2/+1
| | | | | | | | | | | When resetting an attribute, you expect it to return to the state it was before any changes. Namely, this fixes this unexpected behavior: ~~~ruby model.name = "Bob" model.reset_name! model.name_changed? #=> true ~~~
* updating define_attribute_methods documentationFrancesco Rodriguez2012-05-141-1/+1
|
* changing an attribute multiple times retains the correct original valueIan Stewart2011-06-281-0/+9
|
* Remove or fix non-working examples and add a few tests to Dirty [#5185 ↵Tore Darell2010-08-031-5/+85
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Use better assertion methods for testingNeeraj Singh2010-05-191-2/+2
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Restore changed_attributes method in ActiveModel::Dirty and loosen ↵Sam Pohlenz2010-04-011-1/+0
| | | | | | | | expectation on including class' initialize method. [#4308 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix tests added in previous commit.José Valim2010-03-271-0/+1
|
* ActiveModel::Dirty#changes should return a HashWithIndifferentAccess [#4157 ↵Jacob Atzen2010-03-271-0/+29
state:resolved] Keep the Rails style of inject Signed-off-by: José Valim <jose.valim@gmail.com>