Class: Mutant::Result::Env

Inherits:
Object
  • Object
show all
Includes:
Mutant::Result, Coverage
Defined in:
lib/mutant/result.rb

Overview

Env result object

Constant Summary collapse

COVERAGE_PRECISION =
1

Instance Method Summary collapse

Methods included from Coverage

#coverage, included

Methods included from Mutant::Result

included, #overhead

Instance Method Details

#amount_mutationsFixnum

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.

Return amount of mutations

Returns:

  • (Fixnum)

122
123
124
# File 'lib/mutant/result.rb', line 122

def amount_mutations
  env.mutations.length
end

#amount_subjectsFixnum

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.

Return amount of subjects

Returns:

  • (Fixnum)

132
133
134
# File 'lib/mutant/result.rb', line 132

def amount_subjects
  env.subjects.length
end

#failed_subject_resultsArray<Result::Subject>

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.

Return failed subject results

Returns:


107
108
109
# File 'lib/mutant/result.rb', line 107

def failed_subject_results
  subject_results.reject(&:success?)
end

#success?Boolean

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.

Test if run is successful

Returns:

  • (Boolean)

96
97
98
# File 'lib/mutant/result.rb', line 96

def success?
  (coverage * 100).to_f.round(COVERAGE_PRECISION).eql?(env.config.expected_coverage.round(COVERAGE_PRECISION))
end