标签: ruby rack
我想在使用Rack::MockRequest
Rack::MockRequest
cookie = "_session_id=123" client = Rack::MockRequest.new(@app) #something like this? response = client.get("/", "Cookie" => cookie)
我该怎么做?
答案 0 :(得分:1)
试
response = client.get('/', "HTTP_COOKIE" => cookie)