diff options
author | Arthur Neves <arthurnn@gmail.com> | 2014-03-11 14:07:29 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2014-03-11 14:07:29 -0400 |
commit | 3c23f768440659c7c4eb20cea82032f71ef5556d (patch) | |
tree | 0ddd44c150600fe48e0db3b986619d34f57c9910 /activerecord | |
parent | ccaf0ed791d69567f91a659c9efc7d3bb5bc8b3b (diff) | |
download | rails-3c23f768440659c7c4eb20cea82032f71ef5556d.tar.gz rails-3c23f768440659c7c4eb20cea82032f71ef5556d.tar.bz2 rails-3c23f768440659c7c4eb20cea82032f71ef5556d.zip |
Remove mocking on save, when not necessary
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 8e3825999d..09892d50ba 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -691,14 +691,12 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase def test_should_save_changed_has_one_changed_object_if_child_is_saved @pirate.ship.name = "NewName" - @pirate.ship.expects(:save).once.returns(true) - assert @pirate.save + assert_equal "NewName", @pirate.ship.reload.name end def test_should_not_save_changed_has_one_unchanged_object_if_child_is_saved @pirate.ship.expects(:save).never - assert @pirate.save end |