rubyruby-on-rails-3testingminitest

MiniTest - ReRun only failed tests


Is it possible to let minitest run only the failed tests via rake task?

Couldnt find anything in internet about this... With rspec or cucumber it worked.. Is there any possibility here?


Solution

  • The closest thing I could find is this plugin:

    https://github.com/ivantsepp/minitest-rerun-options

    It outputs command line options for failing tests like this:

    Rerun failed tests options:
    --name TestExample#test_another_that_will_fail
    --name TestExample#test_that_will_fail
    

    so you can append them to your rake test command.