Improve reporting to show only uncovered mutations
This commit is contained in:
parent
ef25d84326
commit
fa36323fcd
3 changed files with 11 additions and 4 deletions
|
@ -84,8 +84,6 @@ module Mutant
|
||||||
self.class.type
|
self.class.type
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
# Return mutation to kill
|
# Return mutation to kill
|
||||||
#
|
#
|
||||||
# @return [Mutation]
|
# @return [Mutation]
|
||||||
|
@ -94,6 +92,8 @@ module Mutant
|
||||||
#
|
#
|
||||||
attr_reader :mutation
|
attr_reader :mutation
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
# Initialize killer object
|
# Initialize killer object
|
||||||
#
|
#
|
||||||
# @param [Mutation] mutation
|
# @param [Mutation] mutation
|
||||||
|
|
|
@ -26,7 +26,7 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def mutation(mutation)
|
def mutation(mutation)
|
||||||
colorized_diff(mutation.original_source, mutation.source)
|
#colorized_diff(mutation.original_source, mutation.source)
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -65,6 +65,11 @@ module Mutant
|
||||||
|
|
||||||
puts(colorize(color, "#{word}: #{killer.identification} (%02.2fs)" % killer.runtime))
|
puts(colorize(color, "#{word}: #{killer.identification} (%02.2fs)" % killer.runtime))
|
||||||
|
|
||||||
|
if killer.fail?
|
||||||
|
mutation = killer.mutation
|
||||||
|
colorized_diff(mutation.original_source, mutation.source)
|
||||||
|
end
|
||||||
|
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,9 @@ module Mutant
|
||||||
expression = glob_expression
|
expression = glob_expression
|
||||||
files = Dir[expression]
|
files = Dir[expression]
|
||||||
|
|
||||||
$stderr.puts("Spec file(s): #{expression.inspect} not found for #{mutation.inspect}")
|
if files.empty?
|
||||||
|
$stderr.puts("Spec file(s): #{expression.inspect} not found for #{mutation.inspect}")
|
||||||
|
end
|
||||||
|
|
||||||
files
|
files
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue