diff options
author | Ken Collins <ken@metaskills.net> | 2009-03-10 16:21:19 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-10 14:07:40 -0700 |
commit | 4b4e7caffa361a1a3317586d8f498b4ba353adba (patch) | |
tree | 1ee9c90240c6782cf3902fcae7dd3f336c82c6a0 /activesupport/lib/active_support | |
parent | 0a887e2386a827f554c685dccf91701bb38422b5 (diff) | |
download | rails-4b4e7caffa361a1a3317586d8f498b4ba353adba.tar.gz rails-4b4e7caffa361a1a3317586d8f498b4ba353adba.tar.bz2 rails-4b4e7caffa361a1a3317586d8f498b4ba353adba.zip |
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>
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/testing/setup_and_teardown.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index 7edf6fdb32..aaf9f8f42c 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -45,7 +45,12 @@ module ActiveSupport return if @method_name.to_s == "default_test" if using_mocha = respond_to?(:mocha_verify) - assertion_counter = Mocha::TestCaseAdapter::AssertionCounter.new(result) + assertion_counter_klass = if defined?(Mocha::TestCaseAdapter::AssertionCounter) + Mocha::TestCaseAdapter::AssertionCounter + else + Mocha::Integration::TestUnit::AssertionCounter + end + assertion_counter = assertion_counter_klass.new(result) end yield(Test::Unit::TestCase::STARTED, name) |