Last active
January 6, 2024 07:19
-
-
Save saiqulhaq/efc2532a60c5f9bb4b77ba4e9e096f0b to your computer and use it in GitHub Desktop.
Simplecov for Rails Engine with Minitest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this to your main library file | |
# lib/<engine_name>.rb | |
if ENV['RAILS_ENV'] == 'test' | |
require 'simplecov' | |
SimpleCov.start do | |
load_profile "test_frameworks" | |
add_filter %r{^/config/} | |
add_filter %r{^/db/} | |
add_group "Controllers", "app/controllers" | |
add_group "Channels", "app/channels" | |
add_group "Models", "app/models" | |
add_group "Mailers", "app/mailers" | |
add_group "Helpers", "app/helpers" | |
add_group "Jobs", %w[app/jobs app/workers] | |
add_group "DynamicLinks", "lib/" | |
end | |
end | |
# reference https://github.com/simplecov-ruby/simplecov/issues/434#issuecomment-228210164 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment