Created
April 26, 2012 13:51
-
-
Save krasio/2499754 to your computer and use it in GitHub Desktop.
lib/tasks/rspec.rake
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
require 'rake' | |
require 'rspec/core/rake_task' | |
task :noop do; end | |
spec_prereq = Rails.configuration.generators.options[:rails][:orm] == :active_record ? "db:test:prepare" : :noop | |
namespace :spec do | |
RSpec::Core::RakeTask.new(:lite) do |t| | |
t.pattern = "spec/{models,presenters}/**/*_spec.rb" | |
end | |
RSpec::Core::RakeTask.new(:with_rails) do |t| | |
t.pattern = "spec/{controllers,integration}/**/*_spec.rb" | |
end | |
end | |
task(:spec).clear.enhance([spec_prereq, "spec:lite", "spec:with_rails"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment