diff options
author | Tim Pope <code@tpope.net> | 2008-05-13 15:22:48 -0400 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-13 21:02:13 +0100 |
commit | 3a0d8adcf25e27f7976a1d0996be05f21ffc3805 (patch) | |
tree | 98271dfccf99986c3ba50c14c226246b5725b0c5 | |
parent | d8bcec6ce6b48f271af5c566791417a58b8a617d (diff) | |
download | rails-3a0d8adcf25e27f7976a1d0996be05f21ffc3805.tar.gz rails-3a0d8adcf25e27f7976a1d0996be05f21ffc3805.tar.bz2 rails-3a0d8adcf25e27f7976a1d0996be05f21ffc3805.zip |
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>
-rwxr-xr-x | activerecord/test/cases/fixtures_test.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index 2787b9a39d..aca7cfb367 100755 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -610,15 +610,17 @@ class ActiveSupportSubclassWithFixturesTest < ActiveRecord::TestCase end class FixtureLoadingTest < ActiveRecord::TestCase - def test_logs_message_for_failed_dependency_load - Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError) - ActiveRecord::Base.logger.expects(:warn) - Test::Unit::TestCase.try_to_load_dependency(:does_not_exist) - end + uses_mocha 'reloading_fixtures_through_accessor_methods' do + def test_logs_message_for_failed_dependency_load + Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError) + ActiveRecord::Base.logger.expects(:warn) + Test::Unit::TestCase.try_to_load_dependency(:does_not_exist) + end - def test_does_not_logs_message_for_successful_dependency_load - Test::Unit::TestCase.expects(:require_dependency).with(:works_out_fine) - ActiveRecord::Base.logger.expects(:warn).never - Test::Unit::TestCase.try_to_load_dependency(:works_out_fine) + def test_does_not_logs_message_for_successful_dependency_load + Test::Unit::TestCase.expects(:require_dependency).with(:works_out_fine) + ActiveRecord::Base.logger.expects(:warn).never + Test::Unit::TestCase.try_to_load_dependency(:works_out_fine) + end end end |