summaryrefslogtreecommitdiff
path: root/test/fileutils
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 13:03:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 13:03:30 +0000
commitd479419ad30afaf3c13ca3a895f9779858f4587c (patch)
treea46c8b5d9ca04634d52208d1722b9380df8fb161 /test/fileutils
parentb4bafcb41652d3a6f3c02891603f867fa0d11d23 (diff)
test_fileutils.rb: parents option
* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir): add assertions for parents option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fileutils')
-rw-r--r--test/fileutils/test_fileutils.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index 987bc9a..4ad959a 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -1233,6 +1233,14 @@ class TestFileUtils
rmdir '/'
}
end
+
+ subdir = 'data/sub/dir'
+ mkdir_p(subdir)
+ assert_nothing_raised(Errno::ENOENT) {
+ rmdir(subdir, parents: true)
+ }
+ assert_file_not_exist('data/sub')
+ assert_directory('data')
end
def test_rmtree