Last Updated: February 25, 2016
·
2.19K
· locks

Rake + MiniTest/Spec

I use minitest/spec as my testing style, including ending test files with _spec.

It's easy enough setting up Rake to run your specs correctly, just put this in your Rakefile:

# Rakefile
require 'rake/testtask'

Rake::TestTask.new do |t|
  t.pattern = "spec/*_spec.rb"
end

Bonus

Set the testing task as the default one for extra key-savingnessness:

# Rakefile
task :default => [:test]

See also