rgrove / crass

A Ruby CSS parser that's fully compliant with the CSS Syntax Level 3 specification.
MIT License
138 stars 14 forks source link

Fix compatibility with Minitest 5.19+ #13

Closed voxik closed 10 months ago

voxik commented 10 months ago

The MiniTest was renamed to Minitest:

https://github.com/minitest/minitest/commit/9a57c520ceac76abfe6105866f8548a94eb357b6

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

https://github.com/minitest/minitest/commit/a2c6c18570f6f0a1bf6af70fe3b6d9599a13fdd6

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 commented 10 months ago

Thanks!