зеркало из https://github.com/github/ruby.git
Skip `test_gem_package_task` if `rake` not present
Instead of erroring.
This commit is contained in:
Родитель
967dba157c
Коммит
3d8e0d8e50
|
@ -1,7 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/test_case'
|
||||
require 'rubygems'
|
||||
require 'rubygems/package_task'
|
||||
|
||||
begin
|
||||
require 'rubygems/package_task'
|
||||
rescue LoadError => e
|
||||
raise unless e.path == 'rake/packagetask'
|
||||
end
|
||||
|
||||
unless defined?(Rake::PackageTask)
|
||||
warn 'Skipping Gem::PackageTask tests. rake not found.'
|
||||
end
|
||||
|
||||
class TestGemPackageTask < Gem::TestCase
|
||||
|
||||
|
@ -107,4 +116,4 @@ class TestGemPackageTask < Gem::TestCase
|
|||
assert_equal 'pkg/nokogiri-1.5.0-java', pkg.package_dir_path
|
||||
end
|
||||
|
||||
end
|
||||
end if defined?(Rake::PackageTask)
|
||||
|
|
Загрузка…
Ссылка в новой задаче