Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to add customs rspec tasks in Rails 3
# 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