Created
June 4, 2010 15:34
-
-
Save phorsfall/425554 to your computer and use it in GitHub Desktop.
Capybara Timeout Money Patch
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::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