Skip to content

Fix SimpleCov startup to support Ruby 3.1+

Stan Hu requested to merge sh-fix-simplecov-ruby-3.1 into master

What does this MR do and why?

With https://github.com/ruby/ruby/pull/4856, SimpleCov.start can no longer be called multiple times, or an exception is raised:

RuntimeError:
  coverage measurement is already setup

This was happening when multiple specs loaded fast_spec_helper.

Relates to #396238 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading