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:
parent
8f2cdefd46
commit
4d954b73f8
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue