Skip to content

Instantly share code, notes, and snippets.

@andreapavoni
Created April 19, 2011 15:31
Show Gist options
  • Save andreapavoni/928458 to your computer and use it in GitHub Desktop.
Save andreapavoni/928458 to your computer and use it in GitHub Desktop.
activate SimpleCov just using an ENV
# put at the beginning of your test helper (it doesn't matter which framework you use)
unless ENV['COVERAGE'].nil?
require 'simplecov'
SimpleCov.start 'rails' do
coverage_dir 'coverage'
end
end
# then launch your test this way:
# COVERAGE=1 rake spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment