Skip to content

Commit

Permalink
Merge pull request rails#5963 from kennyj/fix_build_20120425
Browse files Browse the repository at this point in the history
Fix build. It seems that the Mocha's behavior was changed.
  • Loading branch information
jeremy committed Apr 24, 2012
2 parents 71bd509 + 2aa7c6d commit dbef5a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions activerecord/test/cases/autosave_association_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,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

Expand Down Expand Up @@ -672,7 +674,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

Expand Down
4 changes: 3 additions & 1 deletion activerecord/test/cases/explain_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def test_logging_query_plan_without_logger
original = base.logger
base.logger = nil

base.logger.expects(:warn).never
class << base.logger
def warn; raise "Should not be called" end
end

with_threshold(0) do
car = Car.where(:name => 'honda').first
Expand Down

0 comments on commit dbef5a0

Please sign in to comment.