Reputation: 141
I use Faraday gem in app, and I want to test how my app works when Faraday connection fails by timeout. How can I stub request for this case?
Upvotes: 2
Views: 4122
Reputation: 141
I found a working method. May be it is not beautiful, but is works.
faraday_adapter.post('fail') do
raise Faraday::TimeoutError
end
Upvotes: 2