aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 10:39:09 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 10:39:09 +0000
commitb496220a1f70f8393070ffebcb883c7c5fc036d7 (patch)
treee7df67accf737556f78bf7dcae236d10cc287dea /test/rubygems/test_gem.rb
parent0542d61e2717a3b8e1e4a2972bd32385a036cab8 (diff)
downloadruby-b496220a1f70f8393070ffebcb883c7c5fc036d7.tar.gz
skip some tests so that no failure occurs in root privilege
Some tests had failed on `sudo make test-all`, mainly because root can access any files regardless of permission. This change adds `skip` guards into such tests. Note that almost all tests in which `skip` guards is added, already have "windows" guard. This is because there is no support to avoid read access by owner on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem.rb')
-rw-r--r--test/rubygems/test_gem.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 315aea020f..bd4c91d96d 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -463,7 +463,7 @@ class TestGem < Gem::TestCase
assert File.directory?(util_cache_dir)
end
- unless win_platform? then # only for FS that support write protection
+ unless win_platform? || Process.uid == 0 then # only for FS that support write protection
def test_self_ensure_gem_directories_write_protected
gemdir = File.join @tempdir, "egd"
FileUtils.rm_r gemdir rescue nil