-
Notifications
You must be signed in to change notification settings - Fork 71
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
Remove SimpleCove filter #263
Conversation
what is the purpose of the change? Do you want to run simplecove on the spec tests? If so, we should exclude /spec/fixtures? |
@bastelfreak You are right, but the filter still needs to be adjusted. |
Simplecov is only for ruby code coverage. If a module has no native ruby code (types/providers, functions etc), then I'd expect it to report |
@alexjfisher I disagree, because RSpec tests are written in Ruby (.rb) and this issue was only about a broken filter. add_filter '/spec'
add_filter 'spec/fixtures'
|
We're interested in the coverage of the module code (the code under test), not the test code itself. |
Ah, now Puppet Labs has spoken. So if we do not care about the code coverage of tests, why do not we just remove the build step of Rubocop at Travis CI? |
We do care about the code coverage of types and providers, functions, facts. eg https://travis-ci.org/voxpupuli/puppet-corosync/jobs/171357494#L1512 |
I'm keen on reverting this. I really don't think we want the end coverage figure to be polluted by the coverage of the ruby in the spec tests themselves (which is likely to always be 100%?). For example, a module might contain a type/provider with no (or very limited) unit tests. With this in, every time a new rspec-puppet spec test is added, the coverage report will show increased code coverage. In reality, the type/provider, (the thing we care about testing), is still not tested, but the stats look good/better anyway. I'm going to open a PR to revert, but don't want it merged if there isn't a consensus. |
The SimpleCov filter is not necessary and will result in the following report.
As you can see, no file will be processed and the module will always have a coverage of 100%.