The personal finance app for everyone
Add simplecov (#760)
Zach Gollwitzer22e6919eb5c1
diff --git a/.gitignore b/.gitignoreindex 60c70a2b..c65d3262 100644--- a/.gitignore+++ b/.gitignore@@ -53,3 +53,5 @@ compose-dev.yaml# Ignore GCP keyfilegcp-storage-keyfile.json++coveragediff --git a/Gemfile b/Gemfileindex eda3e623..1adb7b69 100644--- a/Gemfile+++ b/Gemfile@@ -71,4 +71,5 @@ group :test dogem "vcr"gem "webmock"gem "climate_control"+ gem "simplecov", require: falseenddiff --git a/Gemfile.lock b/Gemfile.lockindex 9a02111e..f4b76c4f 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -171,6 +171,7 @@ GEMdebug (1.9.2)irb (~> 1.10)reline (>= 0.3.8)+ docile (1.4.0)dotenv (3.1.2)dotenv-rails (3.1.2)dotenv (= 3.1.2)@@ -399,6 +400,12 @@ GEMsentry-ruby (5.17.3)bigdecimalconcurrent-ruby (~> 1.0, >= 1.0.2)+ simplecov (0.22.0)+ docile (~> 1.1)+ simplecov-html (~> 0.11)+ simplecov_json_formatter (~> 0.1)+ simplecov-html (0.12.3)+ simplecov_json_formatter (0.1.4)smart_properties (1.17.0)sorbet-runtime (0.5.11383)stackprof (0.2.26)@@ -493,6 +500,7 @@ DEPENDENCIESselenium-webdriversentry-railssentry-ruby+ simplecovstackprofstimulus-railstailwindcss-railsdiff --git a/test/test_helper.rb b/test/test_helper.rbindex 0f5895dd..c37d06a4 100644--- a/test/test_helper.rb+++ b/test/test_helper.rb@@ -1,3 +1,10 @@+if ENV["COVERAGE"]+ require "simplecov"+ SimpleCov.start "rails" do+ enable_coverage :branch+ end+end+# Test ENV setup:# By default, all features should be disabled# Use the `with_env_overrides` helper to enable features for individual tests@@ -28,6 +35,17 @@ module ActiveSupport# Run tests in parallel with specified workersparallelize(workers: :number_of_processors)+ # https://github.com/simplecov-ruby/simplecov/issues/718#issuecomment-538201587+ if ENV["COVERAGE"]+ parallelize_setup do |worker|+ SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}"+ end++ parallelize_teardown do |worker|+ SimpleCov.result+ end+ end+# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.fixtures :all