Sha256: a23ce38940e6ace4a42338ad4faa6fbd5d5578957b193b614078191012a3ca70

Contents?: true

Size: 1.45 KB

Versions: 57

Compression:

Stored size: 1.45 KB

Contents

Feature: Handles Multiple Formats

  As a developer
  I want to be able to consume remote services of many different formats
  And I want those formats to be automatically detected and handled
  Because web services take many forms
  And I don't want to have to do any extra work

  Scenario: An HTML service
    Given a remote service that returns '<h1>Some HTML</h1>'
    And that service is accessed at the path '/html_service.html'
    And the response from the service has a Content-Type of 'text/html'
    When I call HTTParty#get with '/html_service.html'
    Then it should return a String
    And the return value should match '<h1>Some HTML</h1>'

  Scenario: A JSON service
    Given a remote service that returns '{ "jennings": "waylon", "cash": "johnny" }'
    And that service is accessed at the path '/service.json'
    And the response from the service has a Content-Type of 'application/json'
    When I call HTTParty#get with '/service.json'
    Then it should return a Hash equaling:
       | key      | value  |
       | jennings | waylon |
       | cash     | johnny |

  Scenario: An XML Service
    Given a remote service that returns '<singer>waylon jennings</singer>'
    And that service is accessed at the path '/service.xml'
    And the response from the service has a Content-Type of 'text/xml'
    When I call HTTParty#get with '/service.xml'
    Then it should return a Hash equaling:
       | key    | value           |
       | singer | waylon jennings |

Version data entries

57 entries across 57 versions & 7 rubygems

Version Path
plyom_user-0.1.1 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.1.0 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.9 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.8 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.7 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.6 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.5 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.4 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.3 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
plyom_user-0.0.2 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/features/handles_multiple_formats.feature
httparty-0.11.0 features/handles_multiple_formats.feature
httparty-0.10.2 features/handles_multiple_formats.feature
httparty-0.10.1 features/handles_multiple_formats.feature
httparty-0.10.0 features/handles_multiple_formats.feature
dkastner-httparty-0.9.0 features/handles_multiple_formats.feature
httparty-0.9.0 features/handles_multiple_formats.feature
httparty-0.8.3 features/handles_multiple_formats.feature
httparty-0.8.2 features/handles_multiple_formats.feature
nutshell-crm-0.0.6.alpha vendor/bundle/gems/httparty-0.8.1/features/handles_multiple_formats.feature
nutshell-crm-0.0.5 vendor/bundle/gems/httparty-0.8.1/features/handles_multiple_formats.feature