My team is using coveralls.io in our CI process to give us an rspec coverage score. We're also using the ActiveAdmin gem for internal use and the decision was made to not cover ActiveAdmin functionality in our test coverage. Does anyone know how we can exempt the /app/admin folder from coveralls so that it doesn't drag our score down?
By using "_test" in the name definitions If you would like to ignore files which are used in the tests then make sense use _test at the end of the name. For example, my_service_mock_test.go . The files with _test at the end of the name will be ignored by default.
Coveralls is a web service that allows users to track the code coverage of their application over time in order to optimize the effectiveness of their unit tests.
Coveralls is a web service to help you track your code coverage over time, and ensure that all your new code is fully covered.
How I was able to solve this:
In '.simplecov' added code:
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start do
add_filter 'app/admin'
end
Basic instructions on this functionality is described at https://github.com/colszowka/simplecov#string-filter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With