Rack::MockResponse provides useful helpers for testing your apps. Usually, you don’t create the MockResponse on your own, but use MockRequest.
# File lib/rack/mock.rb, line 145
145: def initialize(status, headers, body, errors=StringIO.new(""))
146: @status = status.to_i
147:
148: @original_headers = headers
149: @headers = Rack::Utils::HeaderHash.new
150: headers.each { |field, values|
151: @headers[field] = values
152: @headers[field] = "" if values.empty?
153: }
154:
155: @body = ""
156: body.each { |part| @body << part }
157:
158: @errors = errors.string if errors.respond_to?(:string)
159: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.