File: supports_marshalling_with_logger_and_proc.feature

package info (click to toggle)
ruby-httparty 0.21.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 908 kB
  • sloc: ruby: 6,782; xml: 425; sh: 35; makefile: 14
file content (21 lines) | stat: -rw-r--r-- 974 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Feature: Supports marshalling with request logger and/or proc parser
  In order to support caching responses
  As a developer
  I want the request to be able to be marshalled if I have set up a custom
  logger or have a proc as the response parser.

  Scenario: Marshal response with request logger
    Given a remote service that returns '{ "some": "data" }'
    And that service is accessed at the path '/somedata.json'
    When I set my HTTParty logger option
    And I call HTTParty#get with '/somedata.json'
    And I call Marshal.dump on the response
    Then it should not raise a TypeError exception

  Scenario: Marshal response with proc parser
    Given a remote service that returns '{ "some": "data" }'
    And that service is accessed at the path '/somedata.json'
    When I set my HTTParty parser option to a proc
    And I call HTTParty#get with '/somedata.json'
    And I call Marshal.dump on the response
    Then it should not raise a TypeError exception