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.

<<~'MESSAGE'
  --- Neutral failure ---
  Original code was inserted unmutated. And the test did NOT PASS.
  Your tests do not pass initially or you found a bug in mutant / unparser.
  Subject AST:
  %s
  Unparsed Source:
  %s
MESSAGE
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.

<<~'MESSAGE'
  --- Internal failure ---
  BUG: A generated mutation did not result in exactly one diff hunk!
  This is an invariant violation by the mutation generation engine.
  Please report a reproduction to https://github.com/mbj/mutant
  Original unparsed source:
  %s
  Original AST:
  %s
  Mutated unparsed source:
  %s
  Mutated AST:
  %s
MESSAGE
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.

<<~'MESSAGE'
  ---- Noop failure -----
  No code was inserted. And the test did NOT PASS.
  This is typically a problem of your specs not passing unmutated.
MESSAGE
SEPARATOR =

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.

'-----------------------'

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

NL

Instance Method Summary collapse

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

#call

Methods included from Procto

included

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
59
# File 'lib/mutant/reporter/cli/printer/mutation_result.rb', line 54

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