Permalink
Browse files

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

  • Loading branch information...
1 parent 18bce29 commit bb80a875dacc984fa5a0da8c0c663e6fcd03f377 @kennyj kennyj committed with carlosantoniodasilva Apr 24, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 activerecord/test/cases/autosave_association_test.rb
@@ -592,7 +592,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
@@ -637,7 +639,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

0 comments on commit bb80a87

Please sign in to comment.