class Rack::MockRequest
def request(method = GET, uri = "", opts = {})
uri to the rack application and return a MockResponse.
Make a request using the given request method for the given
def request(method = GET, uri = "", opts = {}) env = self.class.env_for(uri, opts.merge(method: method)) if opts[:lint] app = Rack::Lint.new(@app) else app = @app end errors = env[RACK_ERRORS] status, headers, body = app.call(env) MockResponse.new(status, headers, body, errors) ensure body.close if body.respond_to?(:close) end