I have a suspicion that this is a local system configuration issue, but I don't know exactly what I'm doing wrong. In my spec_helper.rb
file, I have the following lines at the very beginning:
require 'simplecov'
SimpleCov.start 'rails'
I can run the following locally on the command line (which is exactly what RubyMine is running):
/home/scottj/.rvm/rubies/ruby-2.6.1/bin/ruby -x /home/scottj/Source/foamfactory/api/bin/bundle exec /home/scottj/.rvm/rubies/ruby-2.6.1/bin/ruby -r /home/scottj/.local/share/JetBrains/Toolbox/apps/RubyMine/ch-0/221.5787.34/plugins/ruby/rb/simplecov_starter.rb /home/scottj/Source/foamfactory/api/bin/rails spec
And it will generate a report in coverage/index.html
that appears to be correct. However, when I run api: spec
with coverage in RubyMine, all of my files in the app/ directory show up as "0% coverage". I suspect this has something to do with a simplecov_json_formatter
that appears to be installed within my system gems folder, but I'm not sure.
Can anyone help with configuration so I can get back to a stable state where I can see code coverage in RubyMine?