lib/cucumber/formatter/console.rb in cucumber-0.3.2 vs lib/cucumber/formatter/console.rb in cucumber-0.3.3
- old
+ new
@@ -95,11 +95,15 @@
def print_status_counts
counts = [:failed, :skipped, :undefined, :pending, :passed].map do |status|
elements = yield status
elements.any? ? format_string("#{elements.length} #{status.to_s}", status) : nil
+ end.compact
+ if counts.any?
+ @io.puts(" (#{counts.join(', ')})")
+ else
+ @io.puts
end
- @io.puts(" (#{counts.compact.join(', ')})")
end
def dump_count(count, what, state=nil)
[count, state, "#{what}#{count == 1 ? '' : 's'}"].compact.join(" ")
end
\ No newline at end of file