Conditionally remove blank lines

This commit is contained in:
Michael Miller 2019-03-22 13:53:06 -06:00
parent caf19ffbd8
commit acfe9d2808

View file

@ -11,8 +11,10 @@ module Spectator::Formatting
# At the end, the totals and runtime are printed. # At the end, the totals and runtime are printed.
def end_suite(report) def end_suite(report)
ran_anything = report.examples_ran > 0 ran_anything = report.examples_ran > 0
@io.puts if ran_anything
@io.puts @io.puts if is_a?(DotsFormatter)
@io.puts
end
failures(report.failures) if report.failed? && ran_anything failures(report.failures) if report.failed? && ran_anything
stats(report) stats(report)
remaining(report) if report.remaining? remaining(report) if report.remaining?