Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't forward stderr to nil

Fixes #455.
  • Loading branch information...
commit 9bb7b93be343dc9acdd6d28eb3ecc678c3458d14 1 parent ea06a1b
Matthew Horan mhoran authored
Showing with 7 additions and 1 deletion.
  1. +1 −1  lib/capybara/webkit/connection.rb
  2. +6 −0 spec/connection_spec.rb
2  lib/capybara/webkit/connection.rb
View
@@ -75,7 +75,7 @@ def discover_port
def forward_output_in_background_thread
Thread.new do
Thread.current.abort_on_exception = true
- IO.copy_stream(@pipe_stderr, @output_target)
+ IO.copy_stream(@pipe_stderr, @output_target) if @output_target
end
end
6 spec/connection_spec.rb
View
@@ -32,6 +32,12 @@
io.string.should =~ /hello world $/
end
+ it 'does not forward stderr to nil' do
+ IO.should_not_receive(:copy_stream)
+ Capybara::Webkit::Connection.new(:stderr => nil)
+ end
+
+
it "returns the server port" do
connection.port.should be_between 0x400, 0xffff
end
Please sign in to comment.
Something went wrong with that request. Please try again.