Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/msassak/cucumber-rails
- Loading branch information
Showing
6 changed files
with
73 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Feature: Rerun profile | ||
In order to concentrate on failing features | ||
As a Rails developer working with Cucumber | ||
I want to rerun only failing features | ||
|
||
Scenario: Rerun | ||
Given I have created a new Rails 2 app "rails-2-app" with cucumber-rails support | ||
And a file named "rerun.txt" with: | ||
""" | ||
features/rerun_test.feature:2 | ||
""" | ||
And a file named "features/rerun_test.feature" with: | ||
""" | ||
Feature: Rerun test | ||
Scenario: failing before | ||
Given fixed now | ||
Scenario: always passing | ||
Given passing | ||
""" | ||
And a file named "features/step_definitions/rerun_steps.rb" with: | ||
""" | ||
Given /fixed now/ do | ||
puts "All fixed now" | ||
end | ||
Given /passing/ do | ||
puts "I've always been passing" | ||
end | ||
""" | ||
When I successfully run "rake cucumber:rerun" | ||
Then it should pass with: | ||
""" | ||
1 scenario (1 passed) | ||
1 step (1 passed) | ||
""" | ||
And the file "rerun.txt" should not contain "features/rerun_test.feature:2" | ||
|
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,7 +1,8 @@ | ||
<%% | ||
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" | ||
rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" | ||
std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip" | ||
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip" | ||
%> | ||
default: <%= spork? ? '--drb ' : '' %><%%= std_opts %> | ||
default: <%= spork? ? '--drb ' : '' %><%%= std_opts %> features | ||
wip: <%= spork? ? '--drb ' : '' %>--tags @wip:3 --wip features | ||
rerun: <%= spork? ? '--drb ' : '' %><%%= 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