Sha256: b0dc8dba71bed65dcea5f5eed155739583ac7dbfaf073ec52a5ba312a0d2c668

Contents?: true

Size: 1.13 KB

Versions: 63

Compression:

Stored size: 1.13 KB

Contents

Feature: Deals with HTTP error codes

  As a developer
  I want to be informed of non-successful responses
  Because sometimes thing explode
  And I should probably know what happened

  Scenario: A response of '404 - Not Found'
    Given a remote service that returns a 404 status code
    And that service is accessed at the path '/service.html'
    When I call HTTParty#get with '/service.html'
    Then it should return a response with a 404 response code

  Scenario: A response of '500 - Internal Server Error'
    Given a remote service that returns a 500 status code
    And that service is accessed at the path '/service.html'
    When I call HTTParty#get with '/service.html'
    Then it should return a response with a 500 response code

  Scenario: A non-successful response where I need the body
    Given a remote service that returns a 400 status code
    And the response from the service has a body of 'Bad response'
    And that service is accessed at the path '/service.html'
    When I call HTTParty#get with '/service.html'
    Then it should return a response with a 400 response code
    And the return value should match 'Bad response'

Version data entries

63 entries across 63 versions & 18 rubygems

Version Path
alexvollmer-httparty-0.3.1 features/deals_with_http_error_codes.feature
alexvollmer-httparty-0.4.3 features/deals_with_http_error_codes.feature
cluon-httparty-0.4.3 features/deals_with_http_error_codes.feature
dbalatero-httparty-0.4.4 features/deals_with_http_error_codes.feature
ddollar-httparty-0.4.6 features/deals_with_http_error_codes.feature
geetarista-httparty-0.4.5 features/deals_with_http_error_codes.feature
jcinnamond-httparty-0.4.5 features/deals_with_http_error_codes.feature
jcinnamond-httparty-0.4.6 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.2.10 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.2.9 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.3.0 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.3.1 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.4.0 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.4.1 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.4.2 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.4.3 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.4.4 features/deals_with_http_error_codes.feature
jnunemaker-httparty-0.4.5 features/deals_with_http_error_codes.feature
kerryb-httparty-0.3.2 features/deals_with_http_error_codes.feature
kerryb-httparty-0.3.3 features/deals_with_http_error_codes.feature