Skip to content

Commit

Permalink
add spec for Process.spawn redirecting STDERR to child STDOUT
Browse files Browse the repository at this point in the history
  • Loading branch information
tak1n committed Oct 10, 2015
1 parent c8ce8a7 commit 008cd1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/ruby/shared/process/spawn.rb
Expand Up @@ -376,6 +376,14 @@
@name.should have_data("glark")
end

it "redirects STDERR to child STDOUT if :err => [:child, :out]" do
File.open(@name, 'w') do |file|
lambda do
Process.wait @object.spawn(ruby_cmd("STDERR.print :glark"), :out => file, :err => [:child, :out])
end.should output_to_fd("glark", file)
end
end

it "redirects both STDERR and STDOUT to the given file descriptior" do
File.open(@name, 'w') do |file|
lambda do
Expand Down

0 comments on commit 008cd1e

Please sign in to comment.