Updated to SimpleCov 1.0.0

link:https://github.com/simplecov-ruby/simplecov[Details].

We have to capture the `ArgumentError` when SimpleCov exits because Liquid violates the _Liskov Substitution Principle_ due to expecting an object to be passed into the `#inspect` method which breaks the expectation of `Object` (superclass). _This only happens in CI, not locally._ Created an link:https://github.com/Shopify/liquid/issues/2107[issue] to track this.

Until the Liquid issue is resolved, this does mean that _no_ SimpleCov artifact will be generated in CI.

Milestone: minor
This commit is contained in:
Brooke Kuhlmann
2026-07-17 10:36:00 -06:00
parent 6856b0c76a
commit 2fe0094089
2 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ group :quality do
gem "caliber", "~> 0.88"
gem "git-lint", "~> 11.0"
gem "reek", "~> 6.5", require: false
gem "simplecov", "~> 0.22", require: false
gem "simplecov", "~> 1.0", require: false
end
group :development do
+9 -5
View File
@@ -3,14 +3,18 @@
require "simplecov"
unless ENV["COVERAGE"] == "no"
SimpleCov.start do
add_filter %r(^/spec/)
enable_coverage :branch
enable_coverage_for_eval
minimum_coverage_by_file line: 95, branch: 69
SimpleCov.start :strict do
minimum_coverage branch: 70
end
end
# TODO: Remove once the Liquid gem is fixed because it violates Object#inspect behavior.
SimpleCov.at_exit do
SimpleCov.result.format!
rescue ArgumentError => error
warn "Liquid object inspection failure: #{error.message}"
end
Bundler.require :tools
require "refinements"