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 118 118: def initialize(status, headers, body, errors=StringIO.new("")) 119: @status = status.to_i 120: 121: @original_headers = headers 122: @headers = Rack::Utils::HeaderHash.new 123: headers.each { |field, values| 124: @headers[field] = values 125: @headers[field] = "" if values.empty? 126: } 127: 128: @body = "" 129: body.each { |part| @body << part } 130: 131: @errors = errors.string 132: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.