Created
February 24, 2012 19:13
-
-
Save ywen/1903057 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if ENV["SIMPLECOV"] | |
p "use simple cov" | |
require 'simplecov' | |
SimpleCov.start 'rails' | |
SimpleCov.at_exit do | |
threshold = 100 | |
SimpleCov.result.format! | |
if SimpleCov.result.covered_percent != threshold | |
puts "the threshold is #{threshold}%. the actual coverage is #{SimpleCov.result.covered_percent}%".foreground(:red) | |
exit 1 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment