Skip to content

Commit

Permalink
Avoid cov on 1.8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ukatama committed Jul 23, 2019
1 parent 016606b commit 2276808
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ require "rake/testtask"

task :default => :test

if RUBY_VERSION < '1.8'
task :test_with_coveralls => :test
else
if RUBY_VERSION > '1.8.x'
require 'coveralls/rake/task'
Coveralls::RakeTask.new
task :test_with_coveralls => [:test, 'coveralls:push']
else
task :test_with_coveralls => :test
end

desc 'Clean coverage resuts'
task :clean_coverage do
require 'simplecov'
resultset_path = SimpleCov::ResultMerger.resultset_path
FileUtils.rm resultset_path if File.exist? resultset_path
if RUBY_VERSION > '1.8.x'
require 'simplecov'
resultset_path = SimpleCov::ResultMerger.resultset_path
FileUtils.rm resultset_path if File.exist? resultset_path
end
end

namespace :test do
Expand Down
2 changes: 1 addition & 1 deletion src/test/setup.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if RUBY_VERSION > '1.8'
if RUBY_VERSION > '1.8.x'
require 'simplecov'

if /--enable-frozen-string-literal/.match(ENV['RUBYOPT'])
Expand Down

0 comments on commit 2276808

Please sign in to comment.