Method: Poisol::StubInstance#init_response

Defined in:
lib/poisol/stub/stub_instance.rb

#init_responseObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/poisol/stub/stub_instance.rb', line 17

def init_response
  @response = Response.new
  if  stub_config.response.is_column_array or stub_config.response.is_row_array 
    @response.body = [stub_config.response.body.deep_dup] 
  else
    @response.body = stub_config.response.body.deep_dup
  end
  @response.status = 200
  @response.header = {'Content-Type' => 'application/json'}
end