minitest/excludes.rb extends MiniTest::Unit::TestCase to provide a clean API for excluding certain tests you don’t want to run under certain conditions.
class TestXYZ < MiniTest::Unit::TestCase def test_good test that passes end def test_bad test that fails only on jruby end end
For jruby runs, you can add test/excludes/TestXYZ.rb with:
exclude :test_bad, "Uses ObjectSpace" if jruby?
gem install minitest-excludesIf you want to hack on minitest-excludes, clone it from GitHub:
git clone git://github.com/seattlerb/minitest-excludes