redding/mr — pull request #172 by jcredding (2014-01-27 20:58:13+00:00)
Title: Fix edge case with `assert_not_field_saved` test helper

This modifies the `assert_field_saved` and `assert_not_field_saved`.
Instead of always asserting that the key is in the saved attributes
and that the value matches, it only does one or the other. This is
because `assert_not_field_saved` will fail if a field was saved
with a value other than the expected. The previous implementation
would fail anytime the key was in saved attributes hash. This is
unexpected behavior, because an `assert_not_field_saved` is saying
I expect it was not saved as this value. There is no need to check
that a field wasn't saved (not caring about value), every field is
always saved, it's just saved with a value or `nil`.

This changes `assert_field_saved` to be consistent with the inverse.
Technically, it worked as it was, but I like them being opposites
of each other.

@kellyredding - Ran into some issues with `assert_not_field_saved` while testing this in our large app.