Module: Mutant::Result::CoverageMetric Private

Included in:
Env, Subject
Defined in:
lib/mutant/result.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

CoverageMetric mixin

Constant Summary collapse

FULL_COVERAGE =

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.

Rational(1).freeze

Instance Method Summary collapse

Instance Method Details

#coverageRational

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.

Observed coverage

Returns:

  • (Rational)


15
16
17
18
19
20
21
# File 'lib/mutant/result.rb', line 15

def coverage
  if amount_mutation_results.zero?
    FULL_COVERAGE
  else
    Rational(amount_mutations_killed, amount_mutation_results)
  end
end