Skip to content
This repository
Browse code

Don't forward stderr to nil

Fixes #455.
  • Loading branch information...
commit 9bb7b93be343dc9acdd6d28eb3ecc678c3458d14 1 parent ea06a1b
Matthew Horan mhoran authored
2  lib/capybara/webkit/connection.rb
@@ -75,7 +75,7 @@ def discover_port
75 75 def forward_output_in_background_thread
76 76 Thread.new do
77 77 Thread.current.abort_on_exception = true
78   - IO.copy_stream(@pipe_stderr, @output_target)
  78 + IO.copy_stream(@pipe_stderr, @output_target) if @output_target
79 79 end
80 80 end
81 81
6 spec/connection_spec.rb
@@ -32,6 +32,12 @@
32 32 io.string.should =~ /hello world $/
33 33 end
34 34
  35 + it 'does not forward stderr to nil' do
  36 + IO.should_not_receive(:copy_stream)
  37 + Capybara::Webkit::Connection.new(:stderr => nil)
  38 + end
  39 +
  40 +
35 41 it "returns the server port" do
36 42 connection.port.should be_between 0x400, 0xffff
37 43 end

0 comments on commit 9bb7b93

Please sign in to comment.
Something went wrong with that request. Please try again.