Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix check_code_coverage task.

  • Loading branch information...
commit 9ce3d16993483ed9055c5f52b2016b52a43bcc09 1 parent de0a94e
@myronmarston authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 Rakefile
View
12 Rakefile
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.