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)
|
def killer(killer)
|
||||||
if killer.fail?
|
if killer.fail?
|
||||||
@io.puts(colorize(Color::RED, "!!! Uncovered Mutation !!!"))
|
failure(killer)
|
||||||
differ = Differ.new(killer.original_source,killer.mutation_source)
|
|
||||||
diff = color? ? differ.colorized_diff : differ.diff
|
|
||||||
@io.puts(diff)
|
|
||||||
@io.puts
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self
|
self
|
||||||
|
@ -60,6 +56,22 @@ module Mutant
|
||||||
@io = io
|
@io = io
|
||||||
end
|
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
|
# Test for colored output
|
||||||
#
|
#
|
||||||
# @return [true]
|
# @return [true]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue