Class: Mutant::Env

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/mutant/env.rb,
lib/mutant/env/bootstrap.rb

Overview

Abstract base class for mutant environments

Defined Under Namespace

Classes: Bootstrap

Constant Summary collapse

SEMANTICS_MESSAGE =
"Fix your lib to follow normal ruby semantics!\n" \
'{Module,Class}#name should return resolvable constant name as String or nil'.freeze

Instance Method Summary collapse

Instance Method Details

#kill(mutation) ⇒ Result::Mutation

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.

Kill mutation

Parameters:

Returns:



38
39
40
41
42
43
44
# File 'lib/mutant/env.rb', line 38

def kill(mutation)
  test_result = run_mutation_tests(mutation)
  Result::Mutation.new(
    mutation:    mutation,
    test_result: test_result
  )
end

#warn(message) ⇒ self

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.

Print warning message

Parameters:

  • (String)

Returns:

  • (self)


26
27
28
29
# File 'lib/mutant/env.rb', line 26

def warn(message)
  config.reporter.warn(message)
  self
end