提交 2aa7c6d0 编写于 作者: K kennyj

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

上级 71bd5096
...@@ -627,7 +627,9 @@ def test_should_skip_validation_on_a_child_association_if_marked_for_destruction ...@@ -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 def test_a_child_marked_for_destruction_should_not_be_destroyed_twice
@pirate.ship.mark_for_destruction @pirate.ship.mark_for_destruction
assert @pirate.save assert @pirate.save
@pirate.ship.expects(:destroy).never class << @pirate.ship
def destroy; raise "Should not be called" end
end
assert @pirate.save assert @pirate.save
end end
...@@ -672,7 +674,9 @@ def test_should_skip_validation_on_a_parent_association_if_marked_for_destructio ...@@ -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 def test_a_parent_marked_for_destruction_should_not_be_destroyed_twice
@ship.pirate.mark_for_destruction @ship.pirate.mark_for_destruction
assert @ship.save assert @ship.save
@ship.pirate.expects(:destroy).never class << @ship.pirate
def destroy; raise "Should not be called" end
end
assert @ship.save assert @ship.save
end end
......
...@@ -28,7 +28,9 @@ def test_logging_query_plan_without_logger ...@@ -28,7 +28,9 @@ def test_logging_query_plan_without_logger
original = base.logger original = base.logger
base.logger = nil base.logger = nil
base.logger.expects(:warn).never class << base.logger
def warn; raise "Should not be called" end
end
with_threshold(0) do with_threshold(0) do
car = Car.where(:name => 'honda').first car = Car.where(:name => 'honda').first
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册