Allows you to focus on a few tests with ease without having to use command-line arguments. Good for tools like guard that don’t have enough brains to understand test output. Cf. ZenTest’s autotest (an example of a test runner with strong testing logic).
Inspired by https://github.com/seattlerb/minitest/issues/213
focus class method allows you to specify that the next test
defined should be run.
require “minitest/autorun” require “minitest/focus”
class MyTest < Minitest::Test def test_unrelated; …; end
focus def test_method; …; end # only this one will run
def test_method_edgecase; …; end end
gem install minitest-focusIf you want to hack on minitest-focus, clone it from GitHub:
git clone git://github.com/seattlerb/minitest-focus