Class: Mutant::Result::Env
- Inherits:
-
Object
- Object
- Mutant::Result::Env
- Includes:
- Mutant::Result, Coverage
- Defined in:
- lib/mutant/result.rb
Overview
Env result object
Constant Summary collapse
- COVERAGE_PRECISION =
1
Instance Method Summary collapse
-
#amount_subjects ⇒ Fixnum
private
Return amount of subjects.
-
#failed_subject_results ⇒ Array<Result::Subject>
private
Return failed subject results.
-
#success? ⇒ Boolean
private
Test if run was successful.
Methods included from Coverage
Methods included from Mutant::Result
Instance Method Details
#amount_subjects ⇒ Fixnum
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
132 133 134 |
# File 'lib/mutant/result.rb', line 132 def amount_subjects env.subjects.length end |
#failed_subject_results ⇒ Array<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
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
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 |