diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 27511c2..c5eb829 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -1994,6 +1994,12 @@ def test_move def test_rm_rf check_singleton :rm_rf + FileUtils.mkdir_p('tmp/tree/child') + File.write('tmp/tree/child/file', "contents\n") + assert_equal(['tmp/tree'], FileUtils.rm_rf('tmp/tree')) + assert_file_not_exist('tmp/tree') + assert_equal(['tmp/missing'], FileUtils.rm_rf('tmp/missing')) + return if /mswin|mingw/ =~ RUBY_PLATFORM mkdir 'tmpdatadir' @@ -2045,6 +2051,7 @@ def test_rmdir def test_rmtree check_singleton :rmtree + assert_equal(FileUtils.method(:rm_rf), FileUtils.method(:rmtree)) end def test_safe_unlink