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. I've run this fix against a large test suite and
the build passes [2], so it doesn't feel very risky releasing this.

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-
[2]: alphagov/whitehall#8015
  • Loading branch information
floehopper committed Jul 27, 2023
1 parent d6470af commit 32ef48f
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 32ef48f

Please sign in to comment.