Extends minitest to provide a unique test filtering API.
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.
Features & Problems
- Simple API to conditionally remove tests you don’t want to run.
- Uses plain ruby so you can use conditional logic if need be.
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?
Get The CodeIf you just want to use minitest-excludes, you can install it via RubyGems:
gem install minitest-excludesIf you want to hack on minitest-excludes, clone it from GitHub:
git clone git://github.com/seattlerb/minitest-excludes