1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00
httparty/features/supports_timeout_option.feature
2009-09-12 22:48:07 -04:00

12 lines
558 B
Gherkin

Feature: Supports the timeout option
In order to handle inappropriately slow response times
As a developer
I want my request to raise an exception after my specified timeout as elapsed
Scenario: A long running response
Given a remote service that returns '<h1>Some HTML</h1>'
And that service is accessed at the path '/service.html'
And that service takes 2 seconds to generate a response
When I set my HTTParty timeout option to 1
And I call HTTParty#get with '/service.html'
Then it should raise a Timeout::Error exception