From 46e3246c5c5d68b09c0bb1f6283a2a9c8b49d5e4 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Fri, 22 Mar 2019 14:00:58 -0600 Subject: [PATCH] Fix new lines with pending tests --- src/spectator/formatting/suite_summary.cr | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/spectator/formatting/suite_summary.cr b/src/spectator/formatting/suite_summary.cr index e2b57c1..b9efb7f 100644 --- a/src/spectator/formatting/suite_summary.cr +++ b/src/spectator/formatting/suite_summary.cr @@ -10,18 +10,17 @@ module Spectator::Formatting # A block describing each failure is displayed. # At the end, the totals and runtime are printed. def end_suite(report) - ran_anything = report.examples_ran > 0 - if ran_anything + if report.example_count > 0 @io.puts if is_a?(DotsFormatter) @io.puts end - failures(report.failures) if report.failed? && ran_anything + failures(report.failures) if report.failed_count > 0 stats(report) remaining(report) if report.remaining? if report.failed? - if ran_anything + if report.examples_ran > 0 failure_commands(report.failures) - else # fail-blank mode. + else @io.puts Color.failure("Failing because no tests were run (fail-blank)") end end