aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-13 15:23:38 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-13 15:23:38 +0000
commit8675dd7b53c513f84750c6d6687065df1735df5c (patch)
tree11007f8d81529b4b37dfc70fae6e417aa3aef5f9 /spec/rubyspec/core
parenta3960d0a60d60b22da774875b1bd46342b300bc1 (diff)
downloadruby-8675dd7b53c513f84750c6d6687065df1735df5c.tar.gz
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
Diffstat (limited to 'spec/rubyspec/core')
-rw-r--r--spec/rubyspec/core/process/exec_spec.rb4
-rw-r--r--spec/rubyspec/core/process/spawn_spec.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/rubyspec/core/process/exec_spec.rb b/spec/rubyspec/core/process/exec_spec.rb
index b90720b533..baf9d81c10 100644
--- a/spec/rubyspec/core/process/exec_spec.rb
+++ b/spec/rubyspec/core/process/exec_spec.rb
@@ -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
diff --git a/spec/rubyspec/core/process/spawn_spec.rb b/spec/rubyspec/core/process/spawn_spec.rb
index 31d14054ed..bd3d13f97e 100644
--- a/spec/rubyspec/core/process/spawn_spec.rb
+++ b/spec/rubyspec/core/process/spawn_spec.rb
@@ -575,8 +575,8 @@ describe "Process.spawn" do
end
platform_is :windows do
- it "raises Errno::ENOEXEC when the file is not an executable file" do
- lambda { Process.spawn __FILE__ }.should raise_error(Errno::ENOEXEC)
+ it "raises Errno::EACCES or Errno::ENOEXEC when the file is not an executable file" do
+ lambda { Process.spawn __FILE__ }.should raise_error(->(e){[Errno::EACCES, Errno::ENOEXEC].find{|exc| exc === e}})
end
end
end