secret
Last active

  • Download Gist
wait_until.rb
Ruby
1 2 3 4 5 6 7
def wait_until
require "timeout"
Timeout.timeout(Capybara.default_wait_time) do
sleep(0.1) until value = yield
value
end
end

Give an example usage as well.

wait_until { page.should have_content("something") } @vishnun

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.