title: SimpleCov reports not generating in Rails 3 app after running RSpec tests with Spork
body: <p>I just installed the <a href="https://github.com/colszowka/simplecov" rel="noreferrer">SimpleCov</a> gem to generate code coverage reports on my Rails 3.2.6 app, and it works great with RSpec, just not with Spork.  I am able to get the desired correct report by running <code>rspec --no-drb spec/</code>, but I'd like to also get them with Spork running using just <code>rspec spec/</code>.</p>
  
  <p>Given that there have been people who have had success with this, it seems likely I have errors in my setup.  I have <a href="https://github.com/colszowka/simplecov/blob/master/README.md" rel="noreferrer">read through the setup instructions</a> as well as the <a href="https://github.com/colszowka/simplecov/issues/42" rel="noreferrer">GitHub issue</a> that purports to have a fix for Spork users, but still no luck.  I'm wondering if there is anyone who can provide a full example of their working <strong>spec/spec_helper.rb</strong> file that I could use for reference, as extensive Googling has only turned up snippets.  On the advice of other sites, I've tried changing the <code>config.cache_classes</code> in <strong>config/environments/test.rb</strong> from the default of <code>true</code> to <code>false</code> to <code>!(ENV['DRB'] == 'true')</code>, with no luck.</p>
  
  <p>For reference, this is how I'm setup:</p>
  
  <p><strong>Gemfile</strong></p>
  
  <pre><code>group :development, :test do
    # ...
    gem 'rspec-rails', '2.10.1'
  end
  
  group :test do
    # ...
    gem 'spork', '0.9.0'
    gem 'simplecov', '0.6.4', require: false
  end
  </code></pre>
  
  <p><strong>.spec</strong></p>
  
  <pre><code>--colour
  --drb
  </code></pre>
  
  <p><strong>spec/spec_helper.rb</strong> (changed as per the <a href="https://github.com/colszowka/simplecov/issues/42" rel="noreferrer">GitHub issue</a>)</p>
  
  <pre><code>require 'simplecov'
  SimpleCov.start 'rails'
  
  require 'rubygems'
  require 'spork'
  
  Spork.prefork do
    unless ENV['DRB']
      require 'simplecov'
      SimpleCov.start 'rails'
    end
  
    ENV["RAILS_ENV"] ||= 'test'
    require File.expand_path("../../config/environment", __FILE__)
    require 'rspec/rails'
    require 'rspec/autorun'
  
    Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
  
    RSpec.configure do |config|
      config.mock_with :rspec
      config.fixture_path = "#{::Rails.root}/spec/fixtures"
      config.use_transactional_fixtures = true
      config.infer_base_class_for_anonymous_controllers = false
    end
  end
  
  Spork.each_run do
    if ENV['DRB']
      require 'simplecov'
      SimpleCov.start 'rails'
    end
  end
  </code></pre>
  
  <p>I've tried commenting out/changing the top two <code>SimpleCov</code> statements of this file and the Simplecov statements inside the <code>Spork</code> blocks, but can't seem to find a combination that works.</p>
  
  <p>What am I missing?  Are there any other files I need to change?</p>