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

#fail?, included, #overhead

Instance Method Details

#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:



117
118
119
# File 'lib/mutant/result.rb', line 117

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 was successful

Returns:

  • (Boolean)


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

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