minitest-excludes
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.
Synopsis
1 2 3 4 5 6 7 8 9 |
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:
1 |
exclude :test_bad, "Uses ObjectSpace" if jruby? |
Get The Code
If you just want to use minitest-excludes, you can install it via RubyGems:gem install minitest-excludes
If you want to hack on minitest-excludes, clone it from GitHub:
git clone git://github.com/seattlerb/minitest-excludes