SimpleCov execution in rspec-core builds is sneakily broken #3083
Description
The current build appears to be attempting to run simplecov (it goes to some trouble), and enforce a 100% coverage rule against it, but if you look through the build output of a recent build on the main
branch, you'll find a line like this:
Coverage report generated for RSpec to /home/runner/work/rspec-core/rspec-core/coverage. 2 / 2 LOC (100.0%) covered.
100% is good! But that appears to only be 100% of the two lines in the exe/rspec
file, rather than the entire rspec-core gem, and I'm not sure why. When I run it locally using a more conventional RSpec::Support::Spec.setup_simplecov
as we use in rspec-expectations, I see that we're closer to 98%, with the most significant missing coverage on lib/rspec/core/bisect/fork_runner.rb
(all of RunDispatcher#run_specs
).

Is anyone confident that we actually still need this wrapper script? It was introduced in 2013, and simplecov (and Coverage itself) have come a long way since then. Certainly my experience running simplecov locally against rspec-core doesn't match the experience this script was introduced to solve as described in the introducing commit:
Simplecov was only reporting coverage for a handful of rspec's files, and I realized why
I think the simplest answer here is to just get rid of it, and use the same setup approach the other gems use; we'd get to trim a fair bit of code that way. We'll need to adjust the coverage target downward until I can get more tests in again, but that shouldn't take long; there's less uncovered than rspec-expectations had already (or I can introduce the tests first if you'd rather, and get coverage to 100% before fixing the simplecov setup)