Skip to content

Instantly share code, notes, and snippets.

@phorsfall
Created June 4, 2010 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phorsfall/425554 to your computer and use it in GitHub Desktop.
Save phorsfall/425554 to your computer and use it in GitHub Desktop.
Capybara Timeout Money Patch
class Capybara::Driver::RackTest
private
def follow_redirects!
Capybara::WaitUntil.timeout(4) do
redirect = response.redirect?
follow_redirect! if redirect
not redirect
end
rescue Capybara::TimeoutError
raise Capybara::InfiniteRedirectError, "infinite redirect detected!"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment