Class: Mutest::Reporter::CLI::Printer::MutationResult Private

Inherits:
Mutest::Reporter::CLI::Printer show all
Defined in:
lib/mutest/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

DIFF_ERROR_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.

'BUG: Mutation NOT resulted in exactly one diff hunk. Please report a reproduction!'.freeze
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.

{
  Mutest::Mutation::Evil    => :evil_details,
  Mutest::Mutation::Neutral => :neutral_details,
  Mutest::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 ---\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 mutest / unparser.\n" \
"Subject AST:\n" \
"%s\n" \
"Unparsed Source:\n" \
"%s\n" \
"Test Result:\n".freeze
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 ---\n" \
"BUG: Mutation NOT resulted in exactly one diff hunk. Please report a reproduction!\n" \
"Original unparsed source:\n" \
"%s\n" \
"Original AST:\n" \
"%s\n" \
"Mutated unparsed source:\n" \
"%s\n" \
"Mutated AST:\n" \
"%s\n".freeze
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 -----\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 Result:\n".freeze
'-----------------------'.freeze

Constants inherited from Mutest::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)


51
52
53
54
55
# File 'lib/mutest/reporter/cli/printer/mutation_result.rb', line 51

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