Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from vitorbaptista/1ff2498ccd25e6b2c2776cc5f86…
…4deae4451fe2e Upgrading gems so we're able to install in Ubuntu 12.04 without modifications (now with Cucumber!)
- Loading branch information
Showing
49 changed files
with
306 additions
and
244 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<% | ||
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" | ||
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" | ||
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip" | ||
%> | ||
default: <%= std_opts %> features | ||
wip: --tags @wip:3 --wip features | ||
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip |
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,53 @@ | ||
$LOAD_PATH.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib') if File.directory?(RAILS_ROOT + '/vendor/plugins/cucumber/lib') | ||
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. | ||
# It is recommended to regenerate this file in the future when you upgrade to a | ||
# newer version of cucumber-rails. Consider adding your own code to a new file | ||
# instead of editing this one. Cucumber will automatically load all features/**/*.rb | ||
# files. | ||
|
||
|
||
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks | ||
|
||
vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first | ||
$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil? | ||
|
||
begin | ||
require 'cucumber/rake/task' | ||
|
||
Cucumber::Rake::Task.new(:features) do |t| | ||
t.fork = true | ||
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')] | ||
namespace :cucumber do | ||
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t| | ||
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used. | ||
t.fork = true # You may get faster startup if you set this to false | ||
t.profile = 'default' | ||
end | ||
|
||
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t| | ||
t.binary = vendored_cucumber_bin | ||
t.fork = true # You may get faster startup if you set this to false | ||
t.profile = 'wip' | ||
end | ||
|
||
Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t| | ||
t.binary = vendored_cucumber_bin | ||
t.fork = true # You may get faster startup if you set this to false | ||
t.profile = 'rerun' | ||
end | ||
|
||
desc 'Run all features' | ||
task :all => [:ok, :wip] | ||
end | ||
desc 'Alias for cucumber:ok' | ||
task :cucumber => 'cucumber:ok' | ||
|
||
task :default => :cucumber | ||
|
||
task :features => :cucumber do | ||
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***" | ||
end | ||
task :features => 'db:test:prepare' | ||
rescue LoadError | ||
desc 'Cucumber rake task not available' | ||
task :features do | ||
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 | ||
end | ||
|
||
end |
Oops, something went wrong.