Module: Mutant::Result::Coverage

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

Overview

Coverage mixin

Constant Summary collapse

FULL_COVERAGE =
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