Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use Timeout from stdlib since Capybara.timeout is being removed

  • Loading branch information...
commit 4d954b73f8cc658180a4a38430132d7f2b622402 1 parent 8f2cdef
Joe Ferris jferris authored

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. +5 4 lib/capybara/driver/webkit/browser.rb
9 lib/capybara/driver/webkit/browser.rb
... ... @@ -1,6 +1,6 @@
1 1 require 'socket'
2 2 require 'thread'
3   -require 'capybara/util/timeout'
  3 +require 'timeout'
4 4 require 'json'
5 5
6 6 class Capybara::Driver::Webkit
@@ -194,9 +194,10 @@ def pipe_readable?(pipe)
194 194 end
195 195
196 196 def connect
197   - Capybara.timeout(5) do
198   - attempt_connect
199   - !@socket.nil?
  197 + Timeout.timeout(5) do
  198 + while @socket.nil?
  199 + attempt_connect
  200 + end
200 201 end
201 202 end
202 203

0 comments on commit 4d954b7

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