diff options
author | kennyj <kennyj@gmail.com> | 2012-04-25 01:31:26 +0900 |
---|---|---|
committer | Prem Sichanugrist <s@sikachu.com> | 2012-04-24 15:00:36 -0500 |
commit | d95f3d3f73174e5fd946457ab376efbec744c9d5 (patch) | |
tree | 96faf4e2c1fde1c42b7e56c27f802170cee1fb3d /activerecord/test/cases/autosave_association_test.rb | |
parent | db6787af681a74499339bc4b9f83d817c6353410 (diff) | |
download | rails-d95f3d3f73174e5fd946457ab376efbec744c9d5.tar.gz rails-d95f3d3f73174e5fd946457ab376efbec744c9d5.tar.bz2 rails-d95f3d3f73174e5fd946457ab376efbec744c9d5.zip |
Fix build. It seems that the Mocha's behavior were changed.
Diffstat (limited to 'activerecord/test/cases/autosave_association_test.rb')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 4c3f2bda57..315a9b001b 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -626,7 +626,9 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase def test_a_child_marked_for_destruction_should_not_be_destroyed_twice @pirate.ship.mark_for_destruction assert @pirate.save - @pirate.ship.expects(:destroy).never + class << @pirate.ship + def destroy; raise "Should not be called" end + end assert @pirate.save end @@ -671,7 +673,9 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase def test_a_parent_marked_for_destruction_should_not_be_destroyed_twice @ship.pirate.mark_for_destruction assert @ship.save - @ship.pirate.expects(:destroy).never + class << @ship.pirate + def destroy; raise "Should not be called" end + end assert @ship.save end |