Skip to content

Instantly share code, notes, and snippets.

@pepe
Created November 27, 2009 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pepe/243966 to your computer and use it in GitHub Desktop.
Save pepe/243966 to your computer and use it in GitHub Desktop.
require 'rake'
require 'spec'
require 'spec/rake/spectask'
require 'cucumber/rake/task'
namespace :test do
Spec::Rake::SpecTask.new do |t|
FileUtils.rm('test') if File.exists?('test')
t.spec_files = FileList['spec/*_spec.rb']
t.spec_opts = ['-u']
end
Spec::Rake::SpecTask.new('rcov') do |t|
t.rcov = true
t.spec_files = FileList['spec/*_spec.rb']
t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,features\/}
end
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format pretty" # Any valid command line option can go here.
t.rcov = true
end
Cucumber::Rake::Task.new(:cruise) do |t|
t.cucumber_opts = "--format pretty --out=features.txt --format html --out=features.html"
t.rcov = true
t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,features\/}
t.rcov_opts << %[-o "features_rcov"]
end
Cucumber::Rake::Task.new(:rcov) do |t|
t.rcov = true
t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,features\/}
t.rcov_opts << %[-o "features_rcov"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment