1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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 committed by Hiroshi SHIBATA
parent d01c3111c2
commit 590d2222a0
Notes: git 2021-08-31 19:07:07 +09:00
2 changed files with 4 additions and 12 deletions

View file

@ -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

View file

@ -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