From 8e6432b29529f518f1ed44dfd28a4f8cf0f91109 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Mon, 2 Jun 2014 14:26:44 +0000 Subject: [PATCH] Simplify noop reporter --- lib/mutant/reporter/cli/report/mutation.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/mutant/reporter/cli/report/mutation.rb b/lib/mutant/reporter/cli/report/mutation.rb index 3d67f60b..2d219e58 100644 --- a/lib/mutant/reporter/cli/report/mutation.rb +++ b/lib/mutant/reporter/cli/report/mutation.rb @@ -99,12 +99,22 @@ module Mutant # def report_noop info('NOOP MUTATION TESTS FAILED!') - killers.reject(&:success?).map(&:report).map(&:test_report).each do |report| + noop_reports.each do |report| puts(report.test.identification) puts(report.output) end end + # Return test noop reports + # + # @return [Enumerable] + # + # @api private + # + def noop_reports + killers.reject(&:success?).map(&:report).map(&:test_report) + end + end # Mutation end # Report end # CLI