diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-06 07:42:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-06 07:42:44 +0000 |
commit | bc742582dcecd16f4f3e2c2a5da5a78e02f2e011 (patch) | |
tree | b9aaa740b82dc4ef2fb1c310b647f6fbad0466a3 /test/rubygems | |
parent | f3a49d5a768560be32009289e936b8e005ddd373 (diff) | |
download | ruby-bc742582dcecd16f4f3e2c2a5da5a78e02f2e011.tar.gz |
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.rb | 7 |
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? |