Created
April 19, 2011 15:31
-
-
Save andreapavoni/928458 to your computer and use it in GitHub Desktop.
activate SimpleCov just using an ENV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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