Is it possible to run a single test in MiniTest?

Josiah Kiehl picture Josiah Kiehl · Mar 12, 2011 · Viewed 60.9k times · Source

I can run all tests in a single file with:

rake test TEST=path/to/test_file.rb

However, if I want to run just one test in that file, how would I do it?

I'm looking for similar functionality to:

rspec path/to/test_file.rb -l 25

Answer

jduan picture jduan · May 18, 2012

The command should be:

% rake test TEST=test/test_foobar.rb TESTOPTS="--name=test_foobar1 -v"