Commit 274c917f authored by Fabio Pelosin's avatar Fabio Pelosin

[SpecHelper] Use Coveralls only in Ruby > 1.8

parent b87148da
......@@ -2,19 +2,19 @@
#-----------------------------------------------------------------------------#
if ENV['CI'] || ENV['GENERATE_COVERAGE']
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new("1.9")
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("1.9")
if ENV['CI'] || ENV['GENERATE_COVERAGE']
require 'simplecov'
end
require 'coveralls'
require 'coveralls'
if ENV['CI']
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
elsif ENV['GENERATE_COVERAGE']
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
end
SimpleCov.start do
add_filter "/spec_helper/"
if ENV['CI']
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
elsif ENV['GENERATE_COVERAGE']
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
end
SimpleCov.start do
add_filter "/spec_helper/"
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment