Created
June 29, 2010 22:15
-
-
Save kristopher/457901 to your computer and use it in GitHub Desktop.
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
begin | |
require 'cucumber/rake/task' | |
namespace :cucumber do | |
Cucumber::Rake::Task.new(:ci, 'Run features for ci') do |t| | |
t.fork = true # You may get faster startup if you set this to false | |
t.cucumber_opts = "--color --tags ~@wip,~@local --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}" | |
end | |
end | |
desc "Runs specs and features for ci" | |
task :build => 'db:migrate:reset' do | |
build_error = nil | |
begin | |
Rake::Task['spec'].invoke | |
rescue SystemExit => e | |
build_error = e | |
ensure | |
Rake::Task['cucumber:ci'].invoke | |
end | |
if build_error | |
raise e | |
end | |
end | |
rescue LoadError | |
desc 'cucumber rake task not available (cucumber not installed)' | |
task :cucumber do | |
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin' | |
end | |
task :build do | |
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin' | |
end | |
end |
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
Rake::Task[:default].clear | |
task :default => :build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment