summaryrefslogtreecommitdiff
path: root/spec/ruby/core/process/spawn_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/process/spawn_spec.rb')
-rw-r--r--spec/ruby/core/process/spawn_spec.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/ruby/core/process/spawn_spec.rb b/spec/ruby/core/process/spawn_spec.rb
index 8c544daae4..37a7ab9152 100644
--- a/spec/ruby/core/process/spawn_spec.rb
+++ b/spec/ruby/core/process/spawn_spec.rb
@@ -536,12 +536,14 @@ describe "Process.spawn" do
File.read(@name).should == "glarkbang"
end
- it "closes STDERR in the child if :err => :close" do
- File.open(@name, 'w') do |file|
- -> do
- code = "begin; STDOUT.puts 'out'; STDERR.puts 'hello'; rescue => e; puts 'rescued'; end"
- Process.wait Process.spawn(ruby_cmd(code), :out => file, :err => :close)
- end.should output_to_fd("out\nrescued\n", file)
+ platform_is_not :windows do
+ it "closes STDERR in the child if :err => :close" do
+ File.open(@name, 'w') do |file|
+ -> do
+ code = "begin; STDOUT.puts 'out'; STDERR.puts 'hello'; rescue => e; puts 'rescued'; end"
+ Process.wait Process.spawn(ruby_cmd(code), :out => file, :err => :close)
+ end.should output_to_fd("out\nrescued\n", file)
+ end
end
end