Skip to content

Instantly share code, notes, and snippets.

@dblock
Created July 24, 2013 07:38
Show Gist options
  • Save dblock/6068699 to your computer and use it in GitHub Desktop.
Save dblock/6068699 to your computer and use it in GitHub Desktop.
Re-implementation of Capybara wait_until.
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