I often see RestClient::GatewayTimeout
in my application. I'm trying to figure out how to properly test for this, to make sure my application handles it gracefully.
The closest thing to this that I see is stub_request(:any, 'www.example.net').to_timeout
That raises RestClient::RequestTimeout
however and not RestClient::GatewayTimeout
. What's the best way to simulate the latter?