Skip to content
This repository
Browse code

The latest trunk of Mocha > 0.9.5 which addresses issue with MiniUnit…

… compatibility uses namespaced integration classes.

[#2060 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit 4b4e7caffa361a1a3317586d8f498b4ba353adba 1 parent 0a887e2
Ken Collins authored March 10, 2009 jeremy committed March 10, 2009
7  activesupport/lib/active_support/testing/setup_and_teardown.rb
@@ -45,7 +45,12 @@ def run(result)
45 45
           return if @method_name.to_s == "default_test"
46 46
 
47 47
           if using_mocha = respond_to?(:mocha_verify)
48  
-            assertion_counter = Mocha::TestCaseAdapter::AssertionCounter.new(result)
  48
+            assertion_counter_klass = if defined?(Mocha::TestCaseAdapter::AssertionCounter)
  49
+                                        Mocha::TestCaseAdapter::AssertionCounter
  50
+                                      else
  51
+                                        Mocha::Integration::TestUnit::AssertionCounter
  52
+                                      end
  53
+            assertion_counter = assertion_counter_klass.new(result)
49 54
           end
50 55
 
51 56
           yield(Test::Unit::TestCase::STARTED, name)

0 notes on commit 4b4e7ca

Please sign in to comment.
Something went wrong with that request. Please try again.