aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_util.rb')
-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?