lib/junit/plugin.rb in danger-junit-0.6.3 vs lib/junit/plugin.rb in danger-junit-0.6.4
- old
+ new
@@ -106,9 +106,10 @@
# Causes a build fail if there are test failures,
# and outputs a markdown table of the results.
#
# @return [void]
def report
+ return if failures.nil? # because danger calls `report` before loading a file
warn("Skipped #{skipped.count} tests.") if show_skipped_tests && skipped.count > 0
unless failures.empty? && errors.empty?
fail("Tests have failed, see below for more information.", sticky: false)
message = "### Tests: \n\n"