diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-08-02 05:08:50 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-08-02 05:08:50 -0700 |
commit | 5365c10a1f911c24b3e81bfd930b77665556086a (patch) | |
tree | 82f6f16af5931ee8b78f8b5ad344bb23088dcb97 /activesupport | |
parent | 74cf196f63742f21213fd5f8a889e8ee29ab621f (diff) | |
parent | a252436d64aa5d1f971e5d57b6ec177a207796e8 (diff) | |
download | rails-5365c10a1f911c24b3e81bfd930b77665556086a.tar.gz rails-5365c10a1f911c24b3e81bfd930b77665556086a.tar.bz2 rails-5365c10a1f911c24b3e81bfd930b77665556086a.zip |
Merge pull request #7235 from ffmike/mocha_12_2_compat
Fix ActiveSupport integration with Mocha > 0.12.1
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/testing/setup_and_teardown.rb | 4 |
1 files changed, 3 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 78d914f8cf..f2268d1767 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -104,8 +104,10 @@ module ActiveSupport 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 |