mirror of
https://github.com/usetrmnl/trmnl-liquid.git
synced 2026-08-13 23:18:19 -07:00
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:
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user