summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-08-08 10:43:38 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit590d2222a0f803f30f0323d51b8bcb51d6023cea (patch)
tree9b24ee1fc43139a122c564f365eba8b1b117375d /test
parentd01c3111c25d618ab42b0b52b620c55a9305d0e9 (diff)
[rubygems/rubygems] Remove helper method not buying us much
https://github.com/rubygems/rubygems/commit/81dc685d20
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem.rb8
-rw-r--r--test/rubygems/test_gem_path_support.rb8
2 files changed, 4 insertions, 12 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 013daa0610..da6fdc54fa 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -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
diff --git a/test/rubygems/test_gem_path_support.rb b/test/rubygems/test_gem_path_support.rb
index 88a3cc29b9..394cba2b7f 100644
--- a/test/rubygems/test_gem_path_support.rb
+++ b/test/rubygems/test_gem_path_support.rb
@@ -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