From 461ac2601e322c81743fef972b7724fc7af76f84 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 7 Jun 2024 10:15:17 -0400 Subject: [PATCH] Disable simplecov branch coverage --- config/initializers/simple_cov_source_file.rb | 19 ------------------- spec/rails_helper.rb | 2 -- 2 files changed, 21 deletions(-) delete mode 100644 config/initializers/simple_cov_source_file.rb diff --git a/config/initializers/simple_cov_source_file.rb b/config/initializers/simple_cov_source_file.rb deleted file mode 100644 index c6b3586c82..0000000000 --- a/config/initializers/simple_cov_source_file.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# TODO: https://github.com/simplecov-ruby/simplecov/pull/1084 -# Patches this missing condition, monitor for upstream fix - -module SimpleCov - module SourceFileExtensions - def build_branches - coverage_branch_data = coverage_data.fetch('branches', {}) || {} # Add the final empty hash in case where 'branches' is present, but returns nil - branches = coverage_branch_data.flat_map do |condition, coverage_branches| - build_branches_from(condition, coverage_branches) - end - - process_skipped_branches(branches) - end - end -end - -SimpleCov::SourceFile.prepend(SimpleCov::SourceFileExtensions) if defined?(SimpleCov::SourceFile) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 38aa711089..af565f23d4 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -14,8 +14,6 @@ unless ENV['DISABLE_SIMPLECOV'] == 'true' formatter SimpleCov::Formatter::HTMLFormatter end - enable_coverage :branch - add_filter 'lib/linter' add_group 'Libraries', 'lib'