Skip to content

Instantly share code, notes, and snippets.

@stratequip
Created August 24, 2011 14:01
Show Gist options
  • Select an option

  • Save stratequip/1168142 to your computer and use it in GitHub Desktop.

Select an option

Save stratequip/1168142 to your computer and use it in GitHub Desktop.
spec_prereq = Rails.configuration.generators.options[:rails][:orm] == :active_record ? "db:test:prepare" : :noop
patterns = [:requests, :models, :controllers, :views, :helpers, :mailers, :lib, :routing]
namespace :spec do
desc "Run the code examples not in spec/acceptance"
RSpec::Core::RakeTask.new("no_acceptance" => spec_prereq) do |t|
t.pattern = patterns.map { |sub| "./spec/#{sub}/**/*_spec.rb" }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment