1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix tests broken by mocha absence [#186 state:resolved]

Two ActiveRecord tests depended on mocha but were not marked as such.
Place them in a use_mocha block so the test suite passes.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
Tim Pope 2008-05-13 15:22:48 -04:00 committed by Pratik Naik
parent d8bcec6ce6
commit 3a0d8adcf2

View file

@ -610,6 +610,7 @@ class ActiveSupportSubclassWithFixturesTest < ActiveRecord::TestCase
end end
class FixtureLoadingTest < ActiveRecord::TestCase class FixtureLoadingTest < ActiveRecord::TestCase
uses_mocha 'reloading_fixtures_through_accessor_methods' do
def test_logs_message_for_failed_dependency_load def test_logs_message_for_failed_dependency_load
Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError) Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError)
ActiveRecord::Base.logger.expects(:warn) ActiveRecord::Base.logger.expects(:warn)
@ -622,3 +623,4 @@ class FixtureLoadingTest < ActiveRecord::TestCase
Test::Unit::TestCase.try_to_load_dependency(:works_out_fine) Test::Unit::TestCase.try_to_load_dependency(:works_out_fine)
end end
end end
end