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
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Return mutation to kill
|
||||
#
|
||||
# @return [Mutation]
|
||||
|
@ -94,6 +92,8 @@ module Mutant
|
|||
#
|
||||
attr_reader :mutation
|
||||
|
||||
private
|
||||
|
||||
# Initialize killer object
|
||||
#
|
||||
# @param [Mutation] mutation
|
||||
|
|
|
@ -26,7 +26,7 @@ module Mutant
|
|||
# @api private
|
||||
#
|
||||
def mutation(mutation)
|
||||
colorized_diff(mutation.original_source, mutation.source)
|
||||
#colorized_diff(mutation.original_source, mutation.source)
|
||||
self
|
||||
end
|
||||
|
||||
|
@ -65,6 +65,11 @@ module Mutant
|
|||
|
||||
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
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ module Mutant
|
|||
expression = glob_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
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue