Sha256: 7c3e201f2ead41b667b73fcb8333b3f73c4bda5378b2ae704ea3ca67c79fc256

Contents?: true

Size: 694 Bytes

Versions: 7

Compression:

Stored size: 694 Bytes

Contents

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require 'test/unit'
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
require 'rubygems/doc_manager'

class TestGemDocManager < RubyGemTestCase

  def setup
    super

    @spec = quick_gem 'a'
    @manager = Gem::DocManager.new(@spec)
  end

  def test_uninstall_doc_unwritable
    orig_mode = File.stat(@spec.installation_path).mode
    File.chmod 0, @spec.installation_path

    assert_raise Gem::FilePermissionError do
      @manager.uninstall_doc
    end
  ensure
    File.chmod orig_mode, @spec.installation_path
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rubygems-update-1.0.0 test/test_gem_doc_manager.rb
rubygems-update-1.0.1 test/test_gem_doc_manager.rb
rubygems-update-1.1.0 test/test_gem_doc_manager.rb
rubygems-update-0.9.5 test/test_gem_doc_manager.rb
rubygems-update-1.3.0 test/test_gem_doc_manager.rb
rubygems-update-1.2.0 test/test_gem_doc_manager.rb
rubygems-update-1.1.1 test/test_gem_doc_manager.rb