Running minitest on rails 5.1.2. Spring is not enabled and simplecov start is at the very beginning of application_system_test_case.rb:


Code is tested using unit and integration tests, so this code is definitely running
:wave:
You say it is at the beginning of "application_system_test_case.rb" - I'm not very familiar with the new rails system tests, but OAuth code usually is hard to E2E test. So I guess it's done in Unit tests and unit tests shouldn't require your system case unit case, so simplecov also (or even firstly) needs to be started in the test_helper that you call for your minitest tests.
Moved it to test_helper.rb

Same results:

Looks a bit like the class is loaded before simplecov is started. Otherwise at least the class definition should be covered.
What test command do you run?
Could you add a puts "Simplecov" after simplecov was started and a puts "User loaded" at the top of your user class file or inside the user class, I'd bet the one in the user class appears so simplecov isn't started first :)
Yey now is working! Great tip on printing outputs as things gets loaded. I ended up using config/initializers/simplecov.rb as this:

Thank you
Most helpful comment
Yey now is working! Great tip on printing outputs as things gets loaded. I ended up using
config/initializers/simplecov.rbas this:Thank you