carbonfive/raygun — pull request #39 by christiannelson (2012-11-19 04:05:52+00:00)
Title: Code coverage does not run with specs

SimpleCov must be started before loading the environment in the spec helper. Adding this line before loading the environment should do the trick:

require './spec/support/simplecov' if ENV['COVERAGE']

Also, code coverage is no longer run by default. This line in coverage.rake was intended to do that:

Rake::Task['spec'].enhance ['spec:enable_coverage']

but it's overridden by this line in Rakefile:

task(:default).clear

Rather than clearing the task, you can "enhance" it in spec.rake, like this:

Rake::Task['spec'].enhance { Rake::Task['spec:javascripts'].invoke }