Skip to content
Browse files

Skip code coverage check on rubies that don't support SimpleCov.

  • Loading branch information...
1 parent c2df918 commit 3c296c1ddf284fba39debc122863201f234b3749 @myronmarston myronmarston committed
Showing with 12 additions and 11 deletions.
  1. +12 −11 Rakefile
View
23 Rakefile
@@ -25,20 +25,21 @@ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby' # MRI only
spec/unit/interpol/sinatra/request_params_parser_spec.rb
]
end
-else
- task(:quality) { } # no-op
-end
-desc "Checks the spec coverage and fails if it is less than 100%"
-task :check_coverage do
- puts "Checking code coverage..."
- percent = File.read("coverage/coverage_percent.txt").to_f
+ desc "Checks the spec coverage and fails if it is less than 100%"
+ task :check_coverage do
+ puts "Checking code coverage..."
+ percent = File.read("coverage/coverage_percent.txt").to_f
- if percent < 100
- raise "Failed to achieve 100% code coverage: #{percent}"
- else
- puts "Nice work! Code coverage is still 100%"
+ if percent < 100
+ raise "Failed to achieve 100% code coverage: #{percent}"
+ else
+ puts "Nice work! Code coverage is still 100%"
+ end
end
+else
+ task(:quality) { } # no-op
+ task(:check_coverage) { } # no-op
end
task :default => [:spec, :quality, :check_coverage]

0 comments on commit 3c296c1

Please sign in to comment.
Something went wrong with that request. Please try again.