Rack::MockResponse provides useful helpers for testing your apps. Usually, you don’t create the MockResponse on your own, but use MockRequest.
(Not documented)
# File lib/rack/mock.rb, line 115 115: def initialize(status, headers, body, errors=StringIO.new("")) 116: @status = status.to_i 117: 118: @original_headers = headers 119: @headers = Rack::Utils::HeaderHash.new 120: headers.each { |field, values| 121: @headers[field] = values 122: @headers[field] = "" if values.empty? 123: } 124: 125: @body = "" 126: body.each { |part| @body << part } 127: 128: @errors = errors.string 129: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.