Method: Rack::MockResponse#initialize
- Defined in:
- lib/rack/mock_response.rb
permalink #initialize(status, headers, body, errors = nil) ⇒ MockResponse
Returns a new instance of MockResponse.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rack/mock_response.rb', line 24 def initialize(status, headers, body, errors = nil) @original_headers = headers if errors @errors = errors.string if errors.respond_to?(:string) else @errors = "" end super(body, status, headers) @cookies = buffered_body! end |