require 'rake/testtask' Rake::TestTask.new do |t| t.libs << "test" t.pattern = "spec/**/*_spec.rb" end Rake::TestTask.new('test:unit') do |t| t.libs << "test" t.pattern = "spec/unit/**/*_spec.rb" end Rake::TestTask.new('test:acceptance') do |t| t.libs << "test" t.pattern = "spec/acceptance/**/*_spec.rb" end