Move the COVERAGE_ENABLED condition into the Rakefile.
This commit is contained in:
parent
288c54dc29
commit
79ce558f14
5
Rakefile
5
Rakefile
|
@ -88,6 +88,11 @@ def recurse_chmod(dir)
|
|||
end
|
||||
end
|
||||
|
||||
# Only run coverage tests on MRI. SimpleCov is supported on JRuby 9.1, but
|
||||
# generates warnings. It is not supported on Rubinius.
|
||||
TEST_COVERAGE = RUBY_ENGINE == 'ruby'
|
||||
ENV['TEST_COVERAGE'] = TEST_COVERAGE ? '1' : '0'
|
||||
|
||||
desc 'Run tests using RubyDataSource with a format 1 version of TZInfo::Data, RubyDataSource with a format 2 version of TZInfo::Data and ZoneinfoDataSource'
|
||||
task test: [:clean_coverage, :test_ruby_format1, :test_ruby_format2, :test_zoneinfo] do
|
||||
end
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
raise 'Tests must be run with bundler, e.g. bundle exec rake test' unless defined?(Bundler)
|
||||
|
||||
# Only run coverage tests on MRI. SimpleCov is supported on JRuby 9.1, but
|
||||
# generates warnings. It is not supported on Rubinius.
|
||||
COVERAGE_ENABLED = RUBY_ENGINE == 'ruby'
|
||||
COVERAGE_ENABLED = ENV['TEST_COVERAGE'] == '1'
|
||||
|
||||
if COVERAGE_ENABLED && defined?(COVERAGE_TYPE)
|
||||
COVERAGE_NOCOV_TOKEN = if [].respond_to?(:bsearch_index)
|
||||
|
|
Loading…
Reference in New Issue