Class: Mutant::Reporter::CLI::Printer::MutationResult

Inherits:
Mutant::Reporter::CLI::Printer show all
Defined in:
lib/mutant/reporter/cli/printer.rb

Overview

Reporter for mutation results

Constant Summary collapse

DIFF_ERROR_MESSAGE =
'BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!'.freeze
MAP =
{
  Mutant::Mutation::Evil    => :evil_details,
  Mutant::Mutation::Neutral => :neutral_details,
  Mutant::Mutation::Noop    => :noop_details
}.freeze
NEUTRAL_MESSAGE =
"--- Neutral failure ---\n" \
"Original code was inserted unmutated. And the test did NOT PASS.\n" \
"Your tests do not pass initially or you found a bug in mutant / unparser.\n" \
"Subject AST:\n" \
"%s\n" \
"Unparsed Source:\n" \
"%s\n" \
"Test Reports: %d\n"
NOOP_MESSAGE =
"---- Noop failure -----\n" \
"No code was inserted. And the test did NOT PASS.\n" \
"This is typically a problem of your specs not passing unmutated.\n" \
"Test Reports: %d\n"
'-----------------------'.freeze

Constants inherited from Mutant::Reporter::CLI::Printer

NL

Instance Method Summary collapse

Methods inherited from Mutant::Reporter::CLI::Printer

run

Methods included from Delegator

included

Instance Method Details

#runself

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Run report printer

Returns:

  • (self)


443
444
445
446
447
448
# File 'lib/mutant/reporter/cli/printer.rb', line 443

def run
  puts(mutation.identification)
  print_details
  puts(FOOTER)
  self
end