module Rad module HTTPAdapter class << self inject conveyors: :conveyors, config: :config def call env, workspace = {}, &block # result, opt = nil, opt.to_openobject workspace = conveyors.web.call( {env: env, response: Rad::Response.new}.merge(workspace), &block ) response = workspace.response.must_be.defined result = response.finish result end # synchronize_method :call # def mock_call env = {}, workspace = {}, &block # env['PATH_INFO'] ||= '/' # env['rack.input'] ||= StringIO.new # # call env, workspace, &block # end def mock_environment { 'rack.url_scheme' => 'http', 'PATH_INFO' => '/', 'rack.input' => StringIO.new } end end end end