Skip to content

Instantly share code, notes, and snippets.

@ahawkins
Created November 26, 2009 08:04
Show Gist options
  • Save ahawkins/243317 to your computer and use it in GitHub Desktop.
Save ahawkins/243317 to your computer and use it in GitHub Desktop.
vendored_cucumber_dir = Dir["#{RAILS_ROOT}/vendor/{gems,plugins}/cucumber*"].first
$LOAD_PATH.unshift("#{vendored_cucumber_dir}/lib") unless vendored_cucumber_dir.nil?
require 'cucumber/rake/task'
namespace :cucumber do
vendored_cucumber_binary = "#{vendored_cucumber_dir}/bin/cucumber" unless vendored_cucumber_dir.nil?
Cucumber::Rake::Task.new({:rcov => 'db:test:prepare'}, 'Run features through RCOV') do |t|
t.binary = vendored_cucumber_binary
t.fork = true # You may get faster startup if you set this to false
t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
t.rcov = true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment