From 32ef48f410189bb26abe574218306b612fc4de89 Mon Sep 17 00:00:00 2001 From: James Mead Date: Wed, 26 Jul 2023 22:06:32 +0100 Subject: [PATCH] Fix Mocha/Minitest compatibility 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]: https://github.com/alphagov/whitehall/pull/8015 --- lib/mocha/integration/mini_test/adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mocha/integration/mini_test/adapter.rb b/lib/mocha/integration/mini_test/adapter.rb index 81d88003b..fd89551ce 100644 --- a/lib/mocha/integration/mini_test/adapter.rb +++ b/lib/mocha/integration/mini_test/adapter.rb @@ -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