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)


145
146
147
# File 'lib/mutant/result.rb', line 145

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:



129
130
131
# File 'lib/mutant/result.rb', line 129

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)


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

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