A Few Ways To Run Your MiniTest Tests

Posted By Weston Ganger

Sometime you may want to only run some specific test files or method with Minitest. Here's a few ways to do so.

# run specific test file
rake test TEST=test/features/test_site.rb

# run specific test method
rake test TEST=test/features/test_site.rb TESTOPTS="--name=test_foobar -v"

# run a folder of files
rake test TEST=test/features/foobar/*.rb

# run a nested folder of files
rake test TEST=test/features/**/*.rb

Related External Links:

Article Topic:Software Development - Ruby / Rails

Date:December 15, 2016