Created
October 2, 2009 03:04
-
-
Save jstirk/199432 to your computer and use it in GitHub Desktop.
cucumber.rake inc. CC.rb task
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
$LOAD_PATH.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib') if File.directory?(RAILS_ROOT + '/vendor/plugins/cucumber/lib') | |
begin | |
require 'cucumber/rake/task' | |
task :features => 'db:test:prepare' | |
desc "Run all features" | |
task :features => "features:all" | |
namespace :features do | |
Cucumber::Rake::Task.new(:all) do |t| | |
t.cucumber_opts = "--format pretty" | |
end | |
Cucumber::Rake::Task.new(:cruise) do |t| | |
t.cucumber_opts = "--format pretty --out=#{ENV['CC_BUILD_ARTIFACTS']}/features.txt --format html --out=#{ENV['CC_BUILD_ARTIFACTS']}/features.html" | |
t.rcov = true | |
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,lib\/,features\/} | |
t.rcov_opts << %[-o "#{ENV['CC_BUILD_ARTIFACTS']}/features_rcov"] | |
end | |
Cucumber::Rake::Task.new(:rcov) do |t| | |
t.rcov = true | |
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,lib\/,features\/} | |
t.rcov_opts << %[-o "features_rcov"] | |
end | |
end | |
rescue LoadError | |
desc 'Cucumber rake task not available' | |
task :features do | |
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin' | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment