mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/rdoc/test_rdoc_rubygems_hook.rb
(TestRDocRubygemsHook#test_setup_unwritable): 1. check the existance of the file(directory) before touch it. 2. remove test file(directory) after the test. see [ruby-core:50388]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
12f2f7371f
commit
ad01ea426c
2 changed files with 20 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
Sat Dec 1 02:08:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* test/rdoc/test_rdoc_rubygems_hook.rb
|
||||
(TestRDocRubygemsHook#test_setup_unwritable): 1. check the existance
|
||||
of the file(directory) before touch it. 2. remove test
|
||||
file(directory) after the test. see [ruby-core:50388].
|
||||
|
||||
Sat Dec 1 01:51:06 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
[EXPERIMENTAL]
|
||||
|
|
|
@ -202,6 +202,7 @@ class TestRDocRubygemsHook < Gem::TestCase
|
|||
|
||||
def test_setup_unwritable
|
||||
skip 'chmod not supported' if Gem.win_platform?
|
||||
begin
|
||||
FileUtils.mkdir_p @a.doc_dir
|
||||
FileUtils.chmod 0, @a.doc_dir
|
||||
|
||||
|
@ -211,7 +212,11 @@ class TestRDocRubygemsHook < Gem::TestCase
|
|||
|
||||
assert_equal @a.doc_dir, e.directory
|
||||
ensure
|
||||
if File.exist? @a.doc_dir
|
||||
FileUtils.chmod 0755, @a.doc_dir
|
||||
FileUtils.rm_r @a.doc_dir
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue