Fix new lines with pending tests

This commit is contained in:
Michael Miller 2019-03-22 14:00:58 -06:00
parent acfe9d2808
commit 46e3246c5c

View file

@ -10,18 +10,17 @@ module Spectator::Formatting
# A block describing each failure is displayed. # A block describing each failure is displayed.
# 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 if report.example_count > 0
if ran_anything
@io.puts if is_a?(DotsFormatter) @io.puts if is_a?(DotsFormatter)
@io.puts @io.puts
end end
failures(report.failures) if report.failed? && ran_anything failures(report.failures) if report.failed_count > 0
stats(report) stats(report)
remaining(report) if report.remaining? remaining(report) if report.remaining?
if report.failed? if report.failed?
if ran_anything if report.examples_ran > 0
failure_commands(report.failures) failure_commands(report.failures)
else # fail-blank mode. else
@io.puts Color.failure("Failing because no tests were run (fail-blank)") @io.puts Color.failure("Failing because no tests were run (fail-blank)")
end end
end end