1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

source directory may not be writable

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-05-22 14:25:56 +00:00
parent cbedbaf9d9
commit 35695788d1
2 changed files with 19 additions and 6 deletions

View file

@ -40,8 +40,10 @@ describe :dir_delete, shared: true do
end
it "raises an Errno::ENOTDIR when trying to remove a non-directory" do
file = DirSpecs.mock_rmdir("nonempty/regular")
open(file, "w") {}
lambda do
Dir.send @method, __FILE__
Dir.send @method, file
end.should raise_error(Errno::ENOTDIR)
end