Class: PolishGeeks::DevTools::Validators::Simplecov
- Defined in:
- lib/polish_geeks/dev_tools/validators/simplecov.rb
Overview
It verifies if SimpleCov is available
Constant Summary collapse
- MATCH_REGEXP =
Regexp used to match code coverage from Simplecov generated output
/\(\d+.\d+\%\) covered/
Instance Method Summary collapse
-
#output ⇒ Object
Searches if we have SimpleCov hooked to rspec.
- #valid? ⇒ Boolean
Methods inherited from Base
Constructor Details
This class inherits a constructor from PolishGeeks::DevTools::Validators::Base
Instance Method Details
#output ⇒ Object
Searches if we have SimpleCov hooked to rspec
14 15 16 |
# File 'lib/polish_geeks/dev_tools/validators/simplecov.rb', line 14 def output @output ||= @stored_output.rspec[*MATCH_REGEXP] end |
#valid? ⇒ Boolean
9 10 11 |
# File 'lib/polish_geeks/dev_tools/validators/simplecov.rb', line 9 def valid? Object.const_defined?('SimpleCov') || (!output.nil? && !output.empty?) end |