1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Use Timeout from stdlib since Capybara.timeout is being removed

This commit is contained in:
Joe Ferris 2012-03-02 17:42:05 -05:00
parent 8f2cdefd46
commit 4d954b73f8

View file

@ -1,6 +1,6 @@
require 'socket'
require 'thread'
require 'capybara/util/timeout'
require 'timeout'
require 'json'
class Capybara::Driver::Webkit
@ -194,9 +194,10 @@ class Capybara::Driver::Webkit
end
def connect
Capybara.timeout(5) do
attempt_connect
!@socket.nil?
Timeout.timeout(5) do
while @socket.nil?
attempt_connect
end
end
end