Sha256: 2bf0c3338525ff3aff28af0655a3a29de74b7ceecc4cc5c4100ca80dc1be1d1a

Contents?: true

Size: 718 Bytes

Versions: 1

Compression:

Stored size: 718 Bytes

Contents

Feature: Handling Non-Json Response

@ok
  Scenario: mapping to false
  Given following service definition
    """
    class ::FalseClass
      def from_content(content_type, data)
        false
      end
    end

    class SimpleService < RestfulMapper::Service
      base_url "http://localhost:8765"

      get :simple_endpoint do
        path "/simple"

        responses 0 => false
      end

    end
    """
    And the service endpoint at port 8765 responds with following http response:
    """
    HTTP/1.1 200 OK
    Connection: close
    Content-Type: text/plain

    whatever
    """
    When I call service "SimpleService.simple_endpoint"
    Then the result should be equal to:
    """
      false
    """

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restful_mapper-0.0.3 features/non_json_response.feature