我正在尝试在我的请求规范中测试 cookie:
require 'spec_helper'
describe "Cookies"
it "should set correctly" do
request.cookies['foo'] = 'bar'
end
end
但这给了我undefined method 'cookies' for nil:NilClass
。我该如何解决?
我正在尝试在我的请求规范中测试 cookie:
require 'spec_helper'
describe "Cookies"
it "should set correctly" do
request.cookies['foo'] = 'bar'
end
end
但这给了我undefined method 'cookies' for nil:NilClass
。我该如何解决?