Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix build. It seems that the Mocha's behavior were changed.

  • Loading branch information...
commit 4ebe101250945cbd7468aab391cd5fc2fce9b4f8 1 parent d72c25e
@kennyj kennyj authored carlosantoniodasilva committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 activerecord/test/cases/autosave_association_test.rb
View
8 activerecord/test/cases/autosave_association_test.rb
@@ -615,7 +615,9 @@ def test_should_skip_validation_on_a_child_association_if_marked_for_destruction
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
@@ -660,7 +662,9 @@ def test_should_skip_validation_on_a_parent_association_if_marked_for_destructio
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
Please sign in to comment.
Something went wrong with that request. Please try again.