aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_path_support.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 06:52:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 06:52:18 +0000
commit9694bb8cac12969300692dac5a1cf7aa4e3a46cd (patch)
treec3cb423d701f7049ba9382de052e2a937cd1302d /test/rubygems/test_gem_path_support.rb
parent3f606b7063fc7a8b191556365ad343a314719a8d (diff)
downloadruby-9694bb8cac12969300692dac5a1cf7aa4e3a46cd.tar.gz
* lib/rubygems*: Updated to RubyGems 2.0
* test/rubygems*: ditto. * common.mk (prelude): Updated for RubyGems 2.0 source rearrangement. * tool/change_maker.rb: Allow invalid UTF-8 characters in source files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_path_support.rb')
-rw-r--r--test/rubygems/test_gem_path_support.rb34
1 files changed, 4 insertions, 30 deletions
diff --git a/test/rubygems/test_gem_path_support.rb b/test/rubygems/test_gem_path_support.rb
index 830173498f..bffc66f7dc 100644
--- a/test/rubygems/test_gem_path_support.rb
+++ b/test/rubygems/test_gem_path_support.rb
@@ -22,10 +22,10 @@ class TestGemPathSupport < Gem::TestCase
def test_initialize_home
ps = Gem::PathSupport.new "GEM_HOME" => "#{@tempdir}/foo"
- expected = File.join(@tempdir, "foo")
- assert_equal expected, ps.home
+ assert_equal File.join(@tempdir, "foo"), ps.home
- assert_equal [expected, *util_path], ps.path
+ expected = util_path + [File.join(@tempdir, 'foo')]
+ assert_equal expected, ps.path
end
if defined?(File::ALT_SEPARATOR) and File::ALT_SEPARATOR
@@ -43,9 +43,9 @@ class TestGemPathSupport < Gem::TestCase
assert_equal ENV["GEM_HOME"], ps.home
expected = [
- ENV["GEM_HOME"],
File.join(@tempdir, 'foo'),
File.join(@tempdir, 'bar'),
+ ENV["GEM_HOME"],
]
assert_equal expected, ps.path
@@ -61,32 +61,6 @@ class TestGemPathSupport < Gem::TestCase
assert_equal expected, ps.path
end
- def test_path_equals
- ps = Gem::PathSupport.new
-
- ps.send :path=, ['a', 'b']
-
- assert_equal [@tempdir, 'a', 'b'], ps.path
- end
-
- def test_path_equals_empty
- ps = Gem::PathSupport.new
-
- ps.send :path=, nil
-
- assert_equal [@tempdir, 'something'], ps.path
- end
-
- def test_path_equals_empty_no_GEM_PATH
- ENV.delete 'GEM_PATH'
-
- ps = Gem::PathSupport.new
-
- ps.send :path=, nil
-
- assert_equal [@tempdir, *Gem.default_path], ps.path
- end
-
def util_path
ENV["GEM_PATH"].split(File::PATH_SEPARATOR)
end