Permalink
Browse files

Fix check_code_coverage task.

  • Loading branch information...
1 parent de0a94e commit 9ce3d16993483ed9055c5f52b2016b52a43bcc09 @myronmarston committed Jan 28, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 Rakefile
View
@@ -36,11 +36,15 @@ end
desc "Checks the spec coverage and fails if it is less than 100%"
task :check_code_coverage do
- percent = File.read("./coverage/coverage_percent.txt").to_f
- if percent < 99.0
- raise "Spec coverage was not high enough: #{percent.round(2)}%"
+ if RUBY_VERSION < '1.9' || RUBY_ENGINE != 'ruby'
+ puts "Cannot check code coverage--simplecov is not supported on this platform"
else
- puts "Nice job! Spec coverage is still above 99%"
+ percent = File.read("./coverage/coverage_percent.txt").to_f
+ if percent < 98.0
+ raise "Spec coverage was not high enough: #{percent.round(2)}%"
+ else
+ puts "Nice job! Spec coverage is still above 98%"
+ end
end
end

0 comments on commit 9ce3d16

Please sign in to comment.