Created
October 12, 2011 11:03
-
-
Save chikamichi/1280927 to your computer and use it in GitHub Desktop.
How to add customs rspec tasks in Rails 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Our goal is to be able to run spec:bricks along spec, when | |
# using the 'rake spec' command. | |
# In lib/tasks/custom_specs.rake, add: | |
require 'rake/testtask' | |
require 'rspec/core/rake_task' | |
namespace :spec do | |
desc "Run bricks specs" | |
RSpec::Core::RakeTask.new('bricks') do |spec| | |
spec.pattern = 'storm-bricks/spec/**/*_spec.rb' | |
end | |
end | |
Rake::Task[:spec].enhance do | |
Rake::Task["spec:bricks"].invoke | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment