Created
June 24, 2010 01:59
-
-
Save bakineggs/450865 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Selenium::WebDriver::Remote::DefaultHttpClient | |
| def request_with_catch_timeout(*args) | |
| begin | |
| request_without_catch_timeout(*args) | |
| rescue Timeout::Error # Timeout::Error.superclass == Interrupt, so rspec thinks its Ctrl-c and exits | |
| raise Exception.new('request timeout') # Exception isn't a subclass of Interrupt so won't cause the whole test suite to exit | |
| end | |
| end | |
| alias_method_chain :request, :catch_timeout | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment