Skip to content

Instantly share code, notes, and snippets.

@eerohele
Created February 16, 2012 21:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eerohele/1847936 to your computer and use it in GitHub Desktop.
Save eerohele/1847936 to your computer and use it in GitHub Desktop.
A simple Rakefile for running RSpec, Cucumber, or both.
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
namespace :test do
desc 'Run RSpec tests'
RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = %w[--color --format documentation]
task.pattern = 'spec/*_spec.rb'
end
desc 'Run Cucumber features'
Cucumber::Rake::Task.new(:features) do |task|
task.cucumber_opts = 'features --format pretty'
end
task :all => [ :spec, :features ]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment