redding/mr — pull request #86 by jcredding (2013-07-26 16:04:52+00:00)
Title: Support AR's `changed?` attributes interface, expose for `Model`

This updates MR's model to support active record's changed
attributes interface. This exposes a `_changed?` method
for every field which calls AR's matching attribute method. This
allows detecting if an attribute changed for a model, which can
be used to trigger behavior. This also updates the fake record's
to support AR's `_changed?` method. This also involved
updating the test helpers for detecting if a field was saved. The
saved attributes behavior changed (to support the detecting when
an attribute changed). The test helpers expected the old behavior
and thus broke. This updates them and makes them more robust. They
now detect when an attribute was changed and then saved. This
makes the `assert_field_saved` without specifying a value actually
useful.