Move simplecov start to config and require to spec_helper (#39236)

This commit is contained in:
Matt Jankowski 2026-06-01 09:37:17 -04:00 committed by GitHub
parent 1bd13af546
commit 95bc6f0139
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
SimpleCov.start 'rails' do
SimpleCov.configure do
# During parallel runs, ensure unique names for post-run merge
command_name "job-#{ENV['TEST_ENV_NUMBER']}" if ENV['TEST_ENV_NUMBER']

View File

@ -2,8 +2,6 @@
ENV['RAILS_ENV'] ||= 'test'
require 'simplecov' if ENV.fetch('COVERAGE', false)
# This needs to be defined before Rails is initialized
STREAMING_PORT = ENV.fetch('TEST_STREAMING_PORT', '4020')
STREAMING_HOST = ENV.fetch('TEST_STREAMING_HOST', 'localhost')

View File

@ -1,5 +1,10 @@
# frozen_string_literal: true
if ENV.fetch('COVERAGE', false)
require 'simplecov'
SimpleCov.start 'rails'
end
RSpec.configure do |config|
config.example_status_persistence_file_path = 'tmp/rspec/examples.txt'
config.expect_with :rspec do |expectations|