Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/ruby/shared/process/spawn.rb
Original file line number Diff line number Diff line change
@@ -381,26 +381,26 @@
it "redirects STDOUT to the given file descriptior if out: Fixnum" do
File.open(@name, 'w') do |file|
lambda do
Process.wait @object.spawn(ruby_cmd("print :glark"), out: file.fileno)
Process.wait @object.spawn(ruby_cmd(fixture(__FILE__, "print.rb")), out: file.fileno)
end.should output_to_fd("glark", file)
end
end

it "redirects STDOUT to the given file if out: IO" do
File.open(@name, 'w') do |file|
lambda do
Process.wait @object.spawn(ruby_cmd("print :glark"), out: file)
Process.wait @object.spawn(ruby_cmd(fixture(__FILE__, "print.rb")), out: file)
end.should output_to_fd("glark", file)
end
end

it "redirects STDOUT to the given file if out: String" do
Process.wait @object.spawn(ruby_cmd("print :glark"), out: @name)
Process.wait @object.spawn(ruby_cmd(fixture(__FILE__, "print.rb")), out: @name)
@name.should have_data("glark")
end

it "redirects STDOUT to the given file if out: [String name, String mode]" do
Process.wait @object.spawn(ruby_cmd("print :glark"), out: [@name, 'w'])
Process.wait @object.spawn(ruby_cmd(fixture(__FILE__, "print.rb")), out: [@name, 'w'])
@name.should have_data("glark")
end

0 comments on commit 2d0e3ce

Please sign in to comment.