Method: PDK::Report::Event#rspec_puppet_coverage?

Defined in:
lib/pdk/report/event.rb

#rspec_puppet_coverage?Boolean

Checks if the event stores the result of an rspec-puppet coverage check.

Due to the implementation details of this check, the ‘file` value for this event will always point to the coverage.rb file in rspec-puppet, making it easy to filter out.

Returns:

  • (Boolean)

    true if the event contains rspec-puppet coverage results.



99
100
101
102
# File 'lib/pdk/report/event.rb', line 99

def rspec_puppet_coverage?
  @rspec_puppet_coverage_pattern ||= File.join('**', 'lib', 'rspec-puppet', 'coverage.rb')
  source == 'rspec' && PDK::Util::Filesystem.fnmatch?(@rspec_puppet_coverage_pattern, PDK::Util::Filesystem.expand_path(file))
end