Class: Rcov::FailureReport
- Inherits:
-
TextSummary
- Object
- BaseFormatter
- TextSummary
- Rcov::FailureReport
- Defined in:
- lib/rcov/formatters/failure_report.rb
Overview
:nodoc:
Constant Summary
Constants inherited from BaseFormatter
Instance Method Summary collapse
Methods inherited from TextSummary
Methods inherited from BaseFormatter
#add_file, #code_coverage, #each_file_pair_sorted, #initialize, #mangle_filename, #normalize_filename, #num_code_lines, #num_lines, #sorted_file_pairs, #total_coverage
Constructor Details
This class inherits a constructor from Rcov::BaseFormatter
Instance Method Details
#execute ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/rcov/formatters/failure_report.rb', line 3 def execute puts summary coverage = code_coverage * 100 if coverage < @failure_threshold puts "You failed to satisfy the coverage theshold of #{@failure_threshold}%" exit(1) end if (coverage - @failure_threshold) > 3 puts "Your coverage has significantly increased over your threshold of #{@failure_threshold}. Please increase it." end end |