Class: Mutant::Integration Private

Inherits:
Object
  • Object
show all
Includes:
Unparser::AbstractType, Unparser::Adamantium
Defined in:
lib/mutant/integration.rb,
lib/mutant/integration/null.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.

Abstract base class mutant test framework integrations

Direct Known Subclasses

Null

Defined Under Namespace

Classes: Config, Null

Constant Summary collapse

LOAD_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'
  Unable to load integration mutant-%<integration_name>s:
  %<exception>s
  You may have to install the gem mutant-%<integration_name>s!
MESSAGE
CONST_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'
  Unable to load integration mutant-%<integration_name>s:
  %<exception>s
  This is a bug in the integration you have to report.
  The integration is supposed to define %<constant_name>s!
MESSAGE
INTEGRATION_MISSING =

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'
  No test framework integration configured.
  See https://github.com/mbj/mutant/blob/master/docs/configuration.md#integration
MESSAGE

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.setup(env) ⇒ Either<String, Integration>

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.

Setup integration

Parameters:

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/mutant/integration.rb', line 66

def self.setup(env)
  integration_config = env.config.integration

  return Either::Left.new(INTEGRATION_MISSING) unless integration_config.name

  attempt_require(env).bind { attempt_const_get(env) }.fmap do |klass|
    klass.new(
      arguments:         integration_config.arguments,
      expression_parser: env.config.expression_parser,
      world:             env.world
    ).setup
  end
end

Instance Method Details

#all_testsEnumerable<Test>

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.

All tests this integration can run

Some tests may not be available for mutation testing. See #available_tests

Returns:

  • (Enumerable<Test>)


130
# File 'lib/mutant/integration.rb', line 130

abstract_method :all_tests

#available_testsEnumerable<Test>

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.

All tests available for mutation testing

Subset ofr #al_tests

Returns:

  • (Enumerable<Test>)


137
# File 'lib/mutant/integration.rb', line 137

abstract_method :available_tests

#callResult::Test

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 a collection of tests

Parameters:

  • tests (Enumerable<Test>)

Returns:



122
# File 'lib/mutant/integration.rb', line 122

abstract_method :call

#setupself

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.

Perform integration setup

Returns:

  • (self)


113
114
115
# File 'lib/mutant/integration.rb', line 113

def setup
  self
end