WARNING: This is a proof of concept. It works, but is not intended -- in its current form -- to be used for production tests.
Defining And Running Marks
Define a test with some marks:
require "minitest/autorun" require "minitest/unit" require "minitest/mark" class MyTest < MiniTest::Unit::TestCase mark("foo") def test_things assert true end mark("bar") def test_other assert true end end
Run them like normal and they'll run, like normal:
$ ruby my_test.rb Started .. Finished in 0.000743 seconds. 2 tests, 2 assertions, 0 failures, 0 errors, 0 skips
MARK environmental variable to target only select marks:
$ MARK=foo ruby my_test.rb Started . Finished in 0.000533 seconds. 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips