Skip to content

Fix compatibility with Minitest 5.19+ #179

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

voxik
Copy link

@voxik voxik commented Sep 1, 2023

The MiniTest was renamed to Minitest:

minitest/minitest@9a57c52

And the MiniTest constant is now loaded just when MT_COMPAT environment variable is set:

minitest/minitest@a2c6c18

This fixes errors such as:

$ ruby -Ilib:test -rsass-rails -rsprockets/railtie -e 'Dir.glob "./test/**/*.rb", &method(:require)' /builddir/build/BUILD/sassc-rails-2.1.2/usr/share/gems/gems/sassc-rails-2.1.2/test/sassc_rails_test.rb:6:in `<top (required)>': uninitialized constant MiniTest (NameError) class SassRailsTest < MiniTest::Test
                              ^^^^^^
Did you mean?  Minitest
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:dir>:220:in `glob'
	from -e:1:in `<main>'

The `MiniTest` was renamed to `Minitest`:

minitest/minitest@9a57c52

And the `MiniTest` constant is now loaded just when `MT_COMPAT` environment
variable is set:

minitest/minitest@a2c6c18

This fixes errors such as:

~~~
$ ruby -Ilib:test -rsass-rails -rsprockets/railtie -e 'Dir.glob "./test/**/*.rb", &method(:require)'
/builddir/build/BUILD/sassc-rails-2.1.2/usr/share/gems/gems/sassc-rails-2.1.2/test/sassc_rails_test.rb:6:in `<top (required)>': uninitialized constant MiniTest (NameError)
class SassRailsTest < MiniTest::Test
                              ^^^^^^
Did you mean?  Minitest
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:dir>:220:in `glob'
	from -e:1:in `<main>'
~~~
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant