3

I use simplecov to measure coverage for my Rails 4.0.11 app. I use Ruby 2.0.0. I noticed that some subfolders of /app are ignored by simplecov and I can't figure out why.

test_helper.rb:
require 'simplecov'
SimpleCov.start 'rails'

ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)

I have tried upgrading to Ruby 2.1 after reading some posts that that might help, but still some subfolders are being ignored. I also tried to move the SimpleCov.start into a .simplecov file at the root of my project, but the problem persists. I also tried to remove the rails configuration and add filters and groups myself, but the ignored ones just turn up empty.

Folder like /mailers, /serializers, /presenters are all ignored. It does pick up on /models and /controllers.

1 Answers1

0

I had the same issue. in your rails environments/test.rb make config.eager_load = true. this will load every ruby files while app booting.

Oshan Wisumperuma
  • 1,808
  • 1
  • 18
  • 32