🕷 software projects

by ryan davis



Allows you to easily focus on a few tests.

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

Get The Code

If you just want to use minitest-focus, you can install it via RubyGems:
gem install minitest-focus
Fork me on GitHub If you want to hack on minitest-focus, clone it from GitHub:
git clone git://github.com/seattlerb/minitest-focus

Latest Activity