Skip to content

Commit

Permalink
Fix Mocha/Minitest compatibility
Browse files Browse the repository at this point in the history
It turns out we were relying on the very old [1] MiniTest module name
rather than the newer Minitest module name. While there are other places
in the code that use the MiniTest form, most (all?) of those are
internal to Mocha. Anyway making this one change seems to fix the
problems people are having.

Ideally I'd like to add a failing test to force me to make this change,
but I don't have time right now and I want to fix the problem for people
as soon as possible.

It would also be good to do a general clean up of all the uses of
MiniTest to make sure I haven't missed anything.

Fixes #614.

[1]: https://github.com/minitest/minitest/blob/master/History.rdoc#505--2013-06-20-
  • Loading branch information
floehopper committed Jul 27, 2023
1 parent d6470af commit 7963680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mocha/integration/mini_test/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.description

# @private
def self.included(_mod)
Mocha::ExpectationErrorFactory.exception_class = ::MiniTest::Assertion
Mocha::ExpectationErrorFactory.exception_class = ::Minitest::Assertion
end

# @private
Expand Down

0 comments on commit 7963680

Please sign in to comment.