Permalink
Browse files

Merge pull request #7235 from ffmike/mocha_12_2_compat

Fix ActiveSupport integration with Mocha > 0.12.1
  • Loading branch information...
2 parents 74cf196 + a252436 commit 5365c10a1f911c24b3e81bfd930b77665556086a @carlosantoniodasilva carlosantoniodasilva committed Aug 2, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 activesupport/lib/active_support/testing/setup_and_teardown.rb
@@ -104,8 +104,10 @@ def retrieve_mocha_counter(result) #:nodoc:
if respond_to?(:mocha_verify) # using mocha
if defined?(Mocha::TestCaseAdapter::AssertionCounter)
Mocha::TestCaseAdapter::AssertionCounter.new(result)
- else
+ elsif defined?(Mocha::Integration::TestUnit::AssertionCounter)
Mocha::Integration::TestUnit::AssertionCounter.new(result)
+ else
+ Mocha::MonkeyPatching::TestUnit::AssertionCounter.new(result)
end
end
end

0 comments on commit 5365c10

Please sign in to comment.