Class: Mutant::Config::CoverageCriteria Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/config/coverage_criteria.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.

Configuration of coverge conditions

Constant Summary collapse

EMPTY =

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.

new(
  process_abort: nil,
  test_result:   nil,
  timeout:       nil
)
DEFAULT =

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.

new(
  process_abort: false,
  test_result:   true,
  timeout:       false
)
TRANSFORM =

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.

Transform::Sequence.new(
  [
    Transform::Hash.new(
      optional: [
        Transform::Hash::Key.new('process_abort', Transform::BOOLEAN),
        Transform::Hash::Key.new('test_result',   Transform::BOOLEAN),
        Transform::Hash::Key.new('timeout',       Transform::BOOLEAN)
      ],
      required: []
    ),
    Transform::Hash::Symbolize.new,
    ->(value) { Either::Right.new(DEFAULT.with(**value)) }
  ]
)

Instance Method Summary collapse

Instance Method Details

#merge(other) ⇒ CoverageCriteria

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.

Merge coverage criteria with other instance

Values from the other instance have precedence.

Parameters:

Returns:



44
45
46
47
48
49
50
# File 'lib/mutant/config/coverage_criteria.rb', line 44

def merge(other)
  self.class.new(
    process_abort: overwrite(other, :process_abort),
    test_result:   overwrite(other, :test_result),
    timeout:       overwrite(other, :timeout)
  )
end