Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix compatibility with Minitest 5.19+ #13

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

voxik
Copy link
Contributor

@voxik voxik commented Aug 31, 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 following test error:

$ ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)' /builddir/build/BUILD/crass-1.0.4/usr/share/gems/gems/crass-1.0.4/test/support/common.rb:11:in `<top (required)>': uninitialized constant MiniTest (NameError) MiniTest::Spec.class_eval do
        ^^^^^^
Did you mean?  Minitest
	from /builddir/build/BUILD/crass-1.0.4/usr/share/gems/gems/crass-1.0.4/test/test_crass.rb:2:in `require_relative'
	from /builddir/build/BUILD/crass-1.0.4/usr/share/gems/gems/crass-1.0.4/test/test_crass.rb:2:in `<top (required)>'
	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 following test error:

~~~
$ ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
/builddir/build/BUILD/crass-1.0.4/usr/share/gems/gems/crass-1.0.4/test/support/common.rb:11:in `<top (required)>': uninitialized constant MiniTest (NameError)
MiniTest::Spec.class_eval do
        ^^^^^^
Did you mean?  Minitest
	from /builddir/build/BUILD/crass-1.0.4/usr/share/gems/gems/crass-1.0.4/test/test_crass.rb:2:in `require_relative'
	from /builddir/build/BUILD/crass-1.0.4/usr/share/gems/gems/crass-1.0.4/test/test_crass.rb:2:in `<top (required)>'
	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>'
~~~
@rgrove rgrove merged commit b66376d into rgrove:main Aug 31, 2023
12 checks passed
@rgrove
Copy link
Owner

rgrove commented Aug 31, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants