lib/cucumber/formatter/console.rb in aslakhellesoy-cucumber-0.3.11.3 vs lib/cucumber/formatter/console.rb in aslakhellesoy-cucumber-0.3.11.5

- old
+ new

@@ -57,9 +57,21 @@ STDERR.puts("The #print_counts method is deprecated and will be removed in 0.4. Use #print_stats instead") print_stats(nil) end 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) + @failures.each do |failure| + @io.puts format_string("cucumber " + failure.file_colon_line, :failed) + + format_string(" # Scenario: " + failure.name, :comment) + end + @io.puts + end + @io.print dump_count(step_mother.scenarios.length, "scenario") print_status_counts{|status| step_mother.scenarios(status)} @io.print dump_count(step_mother.steps.length, "step") print_status_counts{|status| step_mother.steps(status)} \ No newline at end of file