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

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

Overview

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

Reporter for mutation results

Constant Summary collapse

MAP =

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

{
  Mutant::Mutation::Evil    => :evil_details,
  Mutant::Mutation::Neutral => :neutral_details,
  Mutant::Mutation::Noop    => :noop_details
}.freeze
NEUTRAL_MESSAGE =

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

"--- Neutral failure ---\nOriginal code was inserted unmutated. And the test did NOT PASS.\nYour tests do not pass initially or you found a bug in mutant / unparser.\nSubject AST:\n%s\nUnparsed Source:\n%s\n"
NO_DIFF_MESSAGE =

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

"--- Internal failure ---\nBUG: A generted mutation did not result in exactly one diff hunk!\nThis is an invariant violation by the mutation generation engine.\nPlease report a reproduction to https://github.com/mbj/mutant\nOriginal unparsed source:\n%s\nOriginal AST:\n%s\nMutated unparsed source:\n%s\nMutated AST:\n%s\n"
NOOP_MESSAGE =

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

"---- Noop failure -----\nNo code was inserted. And the test did NOT PASS.\nThis is typically a problem of your specs not passing unmutated.\n"
'-----------------------'

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

NL

Instance Method Summary collapse

Instance Method Details

#runundefined

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:

  • (undefined)


54
55
56
57
58
# File 'lib/mutant/reporter/cli/printer/mutation_result.rb', line 54

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