Skip to content

Commit

Permalink
On 1.9.2 it's MiniTest::TestCase, with no Unit module in there.
Browse files Browse the repository at this point in the history
This appears to work on 1.9.3 as well.
  • Loading branch information
myronmarston committed Jan 22, 2014
1 parent ffce13e commit 8d5148e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rspec/matchers/test_unit_integration.rb
Expand Up @@ -3,13 +3,13 @@
# and a 1.9 bug can lead to infinite recursion from the `super` call in our
# method_missing hook. See this gist for more info:
# https://gist.github.com/845896
if defined?(MiniTest::Unit::TestCase)
MiniTest::Unit::TestCase.add_setup_hook do |instance|
if defined?(MiniTest::TestCase)
MiniTest::TestCase.add_setup_hook do |instance|
unless ::RSpec::Matchers === instance
::RSpec.deprecate("rspec-expectations' built-in integration with minitest < 5.x",
:replacement => "`include RSpec::Matchers` from within `Minitest::Unit::TestCase`")
:replacement => "`include RSpec::Matchers` from within `Minitest::TestCase`")

MiniTest::Unit::TestCase.send(:include, RSpec::Matchers)
MiniTest::TestCase.send(:include, RSpec::Matchers)
end
end
elsif defined?(Test::Unit::TestCase)
Expand Down

0 comments on commit 8d5148e

Please sign in to comment.