Search code examples
ruby-on-railssimplecov

Simple cov gem missing untested files in Rails


Using simple_cov gem in a Rails app, can we have the files that we are not testing included in the report?

  • If yes, how?

  • If no, that files should count to the coverage percentage, right ?


Solution

  • Try to edit your config/environments/test.rb and set this line:

    config.eager_load = false

    to true in this way the whole app is loaded and simplecov reads it.