simplecov-ruby / simplecov

Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
MIT License
4.77k stars 552 forks source link

Coverage analysis under rails 8 beta seems to not be working #1111

Open gnarfle opened 2 weeks ago

gnarfle commented 2 weeks ago

I recently updated an app to the rails 8 beta to play around with it and found the simplecov analysis reports a lot of missing code coverage. Attached is an example of a controller where the rails 7 version has 100% coverage and the rails 8 version says a lot of coverage is missing. These controllers are slightly reworked but the baffling part to me is that the rails 8 version declares I'm missing coverage for things like @user = User.new and params.permit not to mention saving the user, and I definitely have request specs and feature specs covering new and create here that get me 100% coverage in the rails version.

Screenshot 2024-10-09 at 8 15 01 AM Screenshot 2024-10-09 at 8 15 30 AM
Cosmo commented 3 days ago

We have the same issue. As a quick workaround, we disabled parallelize(workers: :number_of_processors) in test/test_helper.rb.