summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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