[rubygems/rubygems] Remove helper method not buying us much

https://github.com/rubygems/rubygems/commit/81dc685d20
This commit is contained in:
David Rodríguez 2021-08-08 10:43:38 +02:00 коммит произвёл Hiroshi SHIBATA
Родитель d01c3111c2
Коммит 590d2222a0
2 изменённых файлов: 4 добавлений и 12 удалений

Просмотреть файл

@ -931,17 +931,13 @@ class TestGem < Gem::TestCase
assert_equal true, Gem.loaded_specs.keys.include?('foo')
end
def util_path
ENV.delete "GEM_HOME"
ENV.delete "GEM_PATH"
end
def test_self_path
assert_equal [Gem.dir], Gem.path
end
def test_self_path_default
util_path
ENV.delete "GEM_HOME"
ENV.delete "GEM_PATH"
Gem.instance_variable_set :@paths, nil

Просмотреть файл

@ -16,7 +16,7 @@ class TestGemPathSupport < Gem::TestCase
assert_equal ENV["GEM_HOME"], ps.home
expected = util_path
expected = ENV["GEM_PATH"].split(File::PATH_SEPARATOR)
assert_equal expected, ps.path, "defaults to GEM_PATH"
end
@ -25,7 +25,7 @@ class TestGemPathSupport < Gem::TestCase
assert_equal File.join(@tempdir, "foo"), ps.home
expected = util_path + [File.join(@tempdir, 'foo')]
expected = ENV["GEM_PATH"].split(File::PATH_SEPARATOR) + [File.join(@tempdir, 'foo')]
assert_equal expected, ps.path
end
@ -102,10 +102,6 @@ class TestGemPathSupport < Gem::TestCase
end
end
def util_path
ENV["GEM_PATH"].split(File::PATH_SEPARATOR)
end
def test_initialize_spec
ENV["GEM_SPEC_CACHE"] = nil