Remove complexity in cli reporter
This commit is contained in:
parent
18af58c7e3
commit
ba34d4d6de
1 changed files with 17 additions and 5 deletions
|
@ -36,11 +36,7 @@ module Mutant
|
|||
#
|
||||
def killer(killer)
|
||||
if killer.fail?
|
||||
@io.puts(colorize(Color::RED, "!!! Uncovered Mutation !!!"))
|
||||
differ = Differ.new(killer.original_source,killer.mutation_source)
|
||||
diff = color? ? differ.colorized_diff : differ.diff
|
||||
@io.puts(diff)
|
||||
@io.puts
|
||||
failure(killer)
|
||||
end
|
||||
|
||||
self
|
||||
|
@ -60,6 +56,22 @@ module Mutant
|
|||
@io = io
|
||||
end
|
||||
|
||||
# Report failure on killer
|
||||
#
|
||||
# @param [Killer] killer
|
||||
#
|
||||
# @return [undefined]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def failure(killer)
|
||||
@io.puts(colorize(Color::RED, "!!! Uncovered Mutation !!!"))
|
||||
differ = Differ.new(killer.original_source,killer.mutation_source)
|
||||
diff = color? ? differ.colorized_diff : differ.diff
|
||||
@io.puts(diff)
|
||||
@io.puts
|
||||
end
|
||||
|
||||
# Test for colored output
|
||||
#
|
||||
# @return [true]
|
||||
|
|
Loading…
Reference in a new issue