Skip to content
This repository
Browse code

Merge pull request #7235 from ffmike/mocha_12_2_compat

Fix ActiveSupport integration with Mocha > 0.12.1
  • Loading branch information...
commit 5365c10a1f911c24b3e81bfd930b77665556086a 2 parents 74cf196 + a252436
Carlos Antonio da Silva carlosantoniodasilva authored
4 activesupport/lib/active_support/testing/setup_and_teardown.rb
@@ -104,8 +104,10 @@ def retrieve_mocha_counter(result) #:nodoc:
104 104 if respond_to?(:mocha_verify) # using mocha
105 105 if defined?(Mocha::TestCaseAdapter::AssertionCounter)
106 106 Mocha::TestCaseAdapter::AssertionCounter.new(result)
107   - else
  107 + elsif defined?(Mocha::Integration::TestUnit::AssertionCounter)
108 108 Mocha::Integration::TestUnit::AssertionCounter.new(result)
  109 + else
  110 + Mocha::MonkeyPatching::TestUnit::AssertionCounter.new(result)
109 111 end
110 112 end
111 113 end

0 comments on commit 5365c10

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