Created
July 24, 2013 07:38
-
-
Save dblock/6068699 to your computer and use it in GitHub Desktop.
Re-implementation of Capybara wait_until.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Capybara::Session | |
def wait_until(timeout = Capybara.default_wait_time) | |
Timeout.timeout(timeout) do | |
sleep(0.1) until value = yield | |
value | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment