Skip to content

Instantly share code, notes, and snippets.

@rreinhardt9
Forked from dblock/capybara_wait_until.rb
Last active August 29, 2015 14:21
Show Gist options
  • Save rreinhardt9/ea01b7af74a9002922ee to your computer and use it in GitHub Desktop.
Save rreinhardt9/ea01b7af74a9002922ee to your computer and use it in GitHub Desktop.
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