diff options
Diffstat (limited to 'test/rubygems/test_gem_doc_manager.rb')
-rw-r--r-- | test/rubygems/test_gem_doc_manager.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_doc_manager.rb b/test/rubygems/test_gem_doc_manager.rb index be4c12bd5b..f52f1f87f1 100644 --- a/test/rubygems/test_gem_doc_manager.rb +++ b/test/rubygems/test_gem_doc_manager.rb @@ -12,25 +12,26 @@ class TestGemDocManager < Gem::TestCase def setup super - @spec = quick_gem 'a' + @spec = quick_gem 'a', 2 @manager = Gem::DocManager.new(@spec) end def test_uninstall_doc_unwritable - orig_mode = File.stat(@spec.installation_path).mode + path = @spec.installation_path + orig_mode = File.stat(path).mode # File.chmod has no effect on MS Windows directories (it needs ACL). if win_platform? skip("test_uninstall_doc_unwritable skipped on MS Windows") else - File.chmod(0, @spec.installation_path) + File.chmod 0000, path end assert_raises Gem::FilePermissionError do @manager.uninstall_doc end ensure - File.chmod orig_mode, @spec.installation_path + File.chmod orig_mode, path end end |