Sha256: 2a69a5352f5723a0b74d6a256223557ca17ac61b05007d4208fb95befb7c54ac

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

Feature: Handling Non-Json Response


  @wip
  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.2 features/non_json_response.feature