Skip to content

Commit

Permalink
Try to get file specific coverage details
Browse files Browse the repository at this point in the history
  • Loading branch information
jagthedrummer committed Nov 27, 2024
1 parent cfedb71 commit 373eeea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ group :development, :test do

# A gem for generating test coverage results in your browser.
gem "simplecov", require: false
gem "simplecov-json", require: false

# Generate test objects.
# 6.3.0 and 6.4.0 have a bug https://github.com/thoughtbot/factory_bot_rails/issues/433
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,9 @@ GEM
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.1)
simplecov-json (0.2.3)
json
simplecov
simplecov_json_formatter (0.1.4)
simpleidn (0.2.3)
snaky_hash (2.0.1)
Expand Down Expand Up @@ -762,6 +765,7 @@ DEPENDENCIES
sentry-ruby
sentry-sidekiq
simplecov
simplecov-json
sprockets-rails
standard
stimulus-rails
Expand Down
5 changes: 5 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Open coverage/index.html in your browser after
# running your tests for test coverage results.
require "simplecov"
require "simplecov-json"
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::JSONFormatter
])
SimpleCov.start "rails"

ENV["RAILS_ENV"] ||= "test"
Expand Down

0 comments on commit 373eeea

Please sign in to comment.