Skip to content

Instantly share code, notes, and snippets.

@wtnabe
Created December 4, 2011 06:04
Show Gist options
  • Save wtnabe/1429364 to your computer and use it in GitHub Desktop.
Save wtnabe/1429364 to your computer and use it in GitHub Desktop.
rspec task file for each spec directories
put .rake file as lib/tasks/spec.rake
# -*- mode: ruby -*-
namespace :spec do
Dir.glob( File.dirname(__FILE__) + '/../../spec/*' ).select { |e|
File.directory? e
}.each { |d|
RSpec::Core::RakeTask.new( File.basename( d ) ) { |spec|
spec.pattern = "#{d}/**/*.rb"
}
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment