lib/cucumber/formatter/console.rb in cucumber-0.6.4 vs lib/cucumber/formatter/console.rb in cucumber-0.7.0.beta.1
- old
+ new
@@ -20,11 +20,11 @@
else
''
end
format = format_for(status, :param)
- line = keyword + " " + step_match.format_args(format) + comment
+ line = keyword + step_match.format_args(format) + comment
format_string(line, status)
end
def format_string(string, status)
fmt = format_for(status)
@@ -61,12 +61,13 @@
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, profiles = [])
- @failures = step_mother.scenarios(:failed).select { |s| s.is_a?(Cucumber::Ast::Scenario) }
+ @failures = step_mother.scenarios(:failed).select { |s| s.is_a?(Cucumber::Ast::Scenario) || s.is_a?(Cucumber::Ast::OutlineTable::ExampleRow) }
+ @failures.collect! { |s| (s.is_a?(Cucumber::Ast::OutlineTable::ExampleRow)) ? s.scenario_outline : s }
- if !@failures.empty?
+ if !@failures.empty?
@io.puts format_string("Failing Scenarios:", :failed)
@failures.each do |failure|
profiles_string = profiles.empty? ? '' : (profiles.map{|profile| "-p #{profile}" }).join(' ') + ' '
@io.puts format_string("cucumber #{profiles_string}" + failure.file_colon_line, :failed) +
format_string(" # Scenario: " + failure.name, :comment)