class Faraday::Adapter::ActionDispatch
def call(env)
def call(env) super @session.__send__(env[:method], env[:url].request_uri, env[:body], env[:request_headers]) resp = @session.response save_response(env, resp.status, resp.body, resp.headers) @app.call env end
def initialize(app, session)
session - An ActionDispatch::Integration::Session instance.
app - The current Faraday request.
a Rails 3 app using integration tests.
initiating an HTTP request with a web server, this adapter calls
Initializes a new middleware instance for each request. Instead of
def initialize(app, session) super(app) @session = session @session.reset! end