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

The exception raised when exec/spawn unexecutable file on Windows is various

It seems that depend on OS version or filesystem


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2017-05-13 15:23:38 +00:00
parent a3960d0a60
commit 8675dd7b53
2 changed files with 4 additions and 4 deletions

View file

@ -21,8 +21,8 @@ describe "Process.exec" do
end
platform_is :windows do
it "raises Errno::ENOEXEC when the file is not an executable file" do
lambda { Process.exec __FILE__ }.should raise_error(Errno::ENOEXEC)
it "raises Errno::EACCES or Errno::ENOEXEC when the file is not an executable file" do
lambda { Process.exec __FILE__ }.should raise_error(->(e){[Errno::EACCES, Errno::ENOEXEC].find{|exc| exc === e}})
end
end
end