public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
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>
tpope (author)
Tue May 13 12:22:48 -0700 2008
lifo (committer)
Tue May 13 13:02:13 -0700 2008
commit  3a0d8adcf25e27f7976a1d0996be05f21ffc3805
tree    98271dfccf99986c3ba50c14c226246b5725b0c5
parent  d8bcec6ce6b48f271af5c566791417a58b8a617d
...
610
611
612
613
614
615
616
617
 
 
 
 
 
 
618
619
620
621
622
 
 
 
 
 
623
624
...
610
611
612
 
 
 
 
 
613
614
615
616
617
618
619
 
 
 
 
620
621
622
623
624
625
626
0
@@ -610,15 +610,17 @@ class ActiveSupportSubclassWithFixturesTest < ActiveRecord::TestCase
0
 end
0
 
0
 class FixtureLoadingTest < ActiveRecord::TestCase
0
-  def test_logs_message_for_failed_dependency_load
0
-    Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError)
0
-    ActiveRecord::Base.logger.expects(:warn)
0
-    Test::Unit::TestCase.try_to_load_dependency(:does_not_exist)
0
-  end
0
+  uses_mocha 'reloading_fixtures_through_accessor_methods' do
0
+    def test_logs_message_for_failed_dependency_load
0
+      Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError)
0
+      ActiveRecord::Base.logger.expects(:warn)
0
+      Test::Unit::TestCase.try_to_load_dependency(:does_not_exist)
0
+    end
0
 
0
-  def test_does_not_logs_message_for_successful_dependency_load
0
-    Test::Unit::TestCase.expects(:require_dependency).with(:works_out_fine)
0
-    ActiveRecord::Base.logger.expects(:warn).never
0
-    Test::Unit::TestCase.try_to_load_dependency(:works_out_fine)
0
+    def test_does_not_logs_message_for_successful_dependency_load
0
+      Test::Unit::TestCase.expects(:require_dependency).with(:works_out_fine)
0
+      ActiveRecord::Base.logger.expects(:warn).never
0
+      Test::Unit::TestCase.try_to_load_dependency(:works_out_fine)
0
+    end
0
   end
0
 end

Comments