lib/manticore/stubbed_response.rb
def handleResponse(response)
      raise response[:raises] if response.key?(:raises)
      @body = response[:body]
      @code = response[:code]
      @headers = response[:headers]
      @cookies = response[:cookies]
      Array(@headers["set-cookie"]).each do |cookie|
        c = Cookie.from_set_cookie(cookie)
        @cookies[c.name] ||= []
        @cookies[c.name] << c
      end
      @callback_result = @handlers[:success].call(self)
      self
    end
# Helper that instantiates a Response and stubs out its body, response code, etc
# @param  stubs [Hash] Hash of parameters to stub. See #stub.
# @return [Manticore::StubbedResponse]
Helper that instantiates a Response and stubs out its body, response code, etc
Helper that instantiates a Response and stubs out its body response code etc
def handleResponse(response)
      raise response[:raises] if response.key?(:raises)
      @body = response[:body]
      @code = response[:code]
      @headers = response[:headers]
      @cookies = response[:cookies]
      Array(@headers["set-cookie"]).each do |cookie|
        c = Cookie.from_set_cookie(cookie)
        @cookies[c.name] ||= []
        @cookies[c.name] << c
      end
      @callback_result = @handlers[:success].call(self)
      self
    end
def handleResponse ( response ) raise response [ :raises ] if response . key? ( :raises ) @body = response [ :body ] @code = response [ :code ] @headers = response [ :headers ] @cookies = response [ :cookies ] Array ( @headers [ "set-cookie" ] ) . each do | cookie | c = Cookie . from_set_cookie ( cookie ) @cookies [ c . name ] ||= [ ] @cookies [ c . name ] << c end @callback_result = @handlers [ :success ] . call ( self ) self end
Helper that instantiates a Response and stubs out its body, response code, etc
Helper that instantiates a Response and stubs out its body response code etc
None
Manticore::StubbedResponse
response
stubs
Hash of parameters to stub. See #stub.
Hash of parameters to stub . See #stub .