class Minitest::TestTask

Minitest::TestTask is a rake helper that generates several rake tasks under the main test task’s name-space.

task <name>      :: the main test task
task <name>:cmd  :: prints the command to use
task <name>:deps :: runs each test file by itself to find dependency errors
task <name>:slow :: runs the tests and reports the slowest 25 tests.

Examples:

Minitest::TestTask.create

The most basic and default setup.

Minitest::TestTask.create :my_tests

The most basic/default setup, but with a custom name

Minitest::TestTask.create :unit do |t|
  t.test_globs = ["test/unit/**/*_test.rb"]
  t.warning = false
end

Customize the name and only run unit tests.

NOTE: To hook this task up to the default, make it a dependency:

task default: :unit