Method: WhatToRun::Differ.normalize_cov_result
- Defined in:
- lib/what_to_run/differ.rb
.normalize_cov_result(result) ⇒ Object
The possible param value that this method might receive are the following
This method will convert negative and nil values to 1, which will make them represent lines that should be run. The positive lines can be kept as they are since this mean they will be run.
The only exception case is the 0 result which will be kept as it is so we don’t run lines within the not called methods
This introduces false positives to avoid missing tests that depends on lines that are evaluated when the file is required
66 67 68 |
# File 'lib/what_to_run/differ.rb', line 66 def normalize_cov_result(result) result.nil? || result.to_i < 0 ? 1 : result end |