summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 07:42:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 07:42:44 +0000
commit422cf1095fc44f8d4b422de6cc579d572f4594bf (patch)
treeb9aaa740b82dc4ef2fb1c310b647f6fbad0466a3 /test/rubygems
parent88035b997930bd00c30be7b69de9d855a7f2322e (diff)
test_gem_util.rb: fix broken test
* test/rubygems/test_gem_util.rb: no guarantee that tmpdir is always underneath the root directory at all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_util.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/rubygems/test_gem_util.rb b/test/rubygems/test_gem_util.rb
index 80dbff4b9e..71a26c06ae 100644
--- a/test/rubygems/test_gem_util.rb
+++ b/test/rubygems/test_gem_util.rb
@@ -42,11 +42,8 @@ class TestGemUtil < Gem::TestCase
assert_equal File.join(@tempdir, 'd'), paths[0]
assert_equal @tempdir, paths[1]
- # File.expand_path with macOS returns `/private` prefix.
- if RUBY_PLATFORM !~ /darwin/
- assert_equal Dir.tmpdir, paths[2]
- assert_equal '/', paths[3]
- end
+ assert_equal File.realpath(Dir.tmpdir), paths[2]
+ assert_equal File.realpath("..", Dir.tmpdir), paths[3]
ensure
# restore default permissions, allow the directory to be removed
FileUtils.chmod(0775, 'd/e') unless win_platform?