Skip to content

Commit

Permalink
Now the failing scenarios listing will show 'cucumber' before the fil…
Browse files Browse the repository at this point in the history
…enames so you can triple-click and copy them
  • Loading branch information
radar committed Jun 10, 2009
1 parent 6101a2b commit c447354
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion features/after_block_exceptions.feature
Expand Up @@ -50,7 +50,7 @@ Feature: After Block Exceptions
Given this step works # features/step_definitions/steps.rb:5
Failing Scenarios:
features/naughty_step_in_scenario.feature:3
cucumber features/naughty_step_in_scenario.feature:3 # Scenario: Naughty Step
2 scenarios (1 failed, 1 passed)
2 steps (2 passed)
Expand Down
2 changes: 1 addition & 1 deletion features/after_step_block_exceptions.feature
Expand Up @@ -51,7 +51,7 @@ Feature: AfterStep Block Exceptions
Given this step works # features/step_definitions/steps.rb:5
Failing Scenarios:
features/naughty_step_in_scenario.feature:3
cucumber features/naughty_step_in_scenario.feature:3 # Scenario: Naughty Step
2 scenarios (1 failed, 1 passed)
2 steps (1 failed, 1 passed)
Expand Down
4 changes: 2 additions & 2 deletions features/background.feature
Expand Up @@ -113,7 +113,7 @@ Feature: backgrounds
Then I should have '10' cukes
Failing Scenarios:
features/background/failing_background.feature:8
cucumber features/background/failing_background.feature:8 # Scenario: failing background
2 scenarios (1 failed, 1 skipped)
6 steps (1 failed, 5 skipped)
Expand Down Expand Up @@ -197,7 +197,7 @@ Feature: backgrounds
Then I should have '10' global cukes
Failing Scenarios:
features/background/failing_background_after_success.feature:10
cucumber features/background/failing_background_after_success.feature:10 # Scenario: failing background
2 scenarios (1 failed, 1 passed)
6 steps (1 failed, 1 skipped, 4 passed)
Expand Down
6 changes: 3 additions & 3 deletions features/cucumber_cli.feature
Expand Up @@ -83,7 +83,7 @@ Feature: Cucumber command line
features/sample.feature:18:in `Given failing'
Failing Scenarios:
features/sample.feature:17
cucumber features/sample.feature:17 # Scenario: Failing
2 scenarios (1 failed, 1 undefined)
2 steps (1 failed, 1 undefined)
Expand Down Expand Up @@ -142,7 +142,7 @@ Feature: Cucumber command line
features/sample.feature:18:in `Given failing'
Failing Scenarios:
features/sample.feature:17
cucumber features/sample.feature:17 # Scenario: Failing
3 scenarios (1 failed, 1 undefined, 1 passed)
3 steps (1 failed, 1 undefined, 1 passed)
Expand Down Expand Up @@ -456,7 +456,7 @@ Feature: Cucumber command line
features/sample.feature:18:in `Given failing'
Failing Scenarios:
features/sample.feature:17
cucumber features/sample.feature:17 # Scenario: Failing
3 scenarios (1 failed, 1 undefined, 1 passed)
3 steps (1 failed, 1 undefined, 1 passed)
Expand Down
4 changes: 2 additions & 2 deletions features/cucumber_cli_diff_disabled.feature
Expand Up @@ -22,7 +22,7 @@ Feature: Cucumber command line
features/failing_expectation.feature:4:in `Given failing expectation'
Failing Scenarios:
features/failing_expectation.feature:3
cucumber features/failing_expectation.feature:3 # Scenario: Failing expectation
1 scenario (1 failed)
1 step (1 failed)
Expand All @@ -44,7 +44,7 @@ Feature: Cucumber command line
features/failing_expectation.feature:4:in `Given failing expectation'
Failing Scenarios:
features/failing_expectation.feature:3
cucumber features/failing_expectation.feature:3 # Scenario: Failing expectation
1 scenario (1 failed)
1 step (1 failed)
Expand Down
2 changes: 1 addition & 1 deletion features/work_in_progress.feature
Expand Up @@ -64,7 +64,7 @@ Feature: Cucumber --work-in-progress switch
features/wip.feature:4:in `Given a failing step'
Failing Scenarios:
features/wip.feature:3
cucumber features/wip.feature:3 # Scenario: Failing
1 scenario (1 failed)
1 step (1 failed)
Expand Down
5 changes: 3 additions & 2 deletions lib/cucumber/formatter/console.rb
Expand Up @@ -63,9 +63,10 @@ def print_stats(features)
@failures = step_mother.scenarios(:failed).select { |s| s.is_a?(Cucumber::Ast::Scenario) }

if !@failures.empty?
@io.puts(format_string("Failing Scenarios:", :failed))
@io.puts format_string("Failing Scenarios:", :failed)
@failures.each do |failure|
@io.puts(format_string(failure.file_colon_line, :failed))
@io.puts format_string("cucumber " + failure.file_colon_line, :failed) +
format_string(" # Scenario: " + failure.name, :comment)
end
@io.puts
end
Expand Down

0 comments on commit c447354

Please sign in to comment.