-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PDK-390) Implement spec:coverage rake task #228
Conversation
This rake task will enable coverage tracking, execute the specs, and print a summary at the bottom of the test run.
and exclude vendored lib/puppet files.
08977ae
to
aa609f0
Compare
Coverage reduction is expected, as it adds the lib/pdk/version.rb file under coverage that was ignored before. It's a feature, not a bug! |
# do not track vendored files | ||
add_filter '/lib/puppet' | ||
add_filter '/vendor' | ||
add_filter '/.vendor' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm suspicious that there is no add_filter '/package-testing'
but that folder doesn't show in the Coveralls report - are these add_filter statements redundant, given that track_files is specifying lib/**/*.rb
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
track_files is the lower bar, add_filter excludes things that get used during execution, but should not be tracked. e.g. when running with bundler defaults, gems get installed into vendor
, and would show up in reports, when they shouldn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, so package-testing does not need excluded because it will never bring code into coverage scope during execution... 👍
This rake task will enable coverage tracking, execute the specs, and print a summary at the bottom of the test run.