Open haggen opened 9 years ago
@haggen I have a smilar problem in that I've been handling Errno::ETIMEDOUT
but not RuntimeError (Request Timeout)
. Curious, what did you do to force the timeout?
@krsyoung I used a mocking gem called webmock
https://github.com/bblimke/webmock
The code was something like this:
stub_request(:any, 'example.org').to_timeout
Unirest.get('example.org') #=> Got RuntimeError when I was expecting Timeout
I tried forcing a timeout and got a
RuntimeError
raised with the message "Request Timeout".Is that it ? Do I have to test the message of a generic exception ? Shouldn't it raise something more particular like
TimeoutError
or anything like that ?Thanks in advance.