我有使用ruby 1.9.3-p286的rails 3.1 app。在ApplicationController中我之前的一个过滤器中,我有session_create_params = {deviceId: cookies.signed[:device_id]}
当我调用某些集成测试时,我得到undefined method [ ]' for nil:NilClass
似乎cookie是零。我该如何解决这个或我做错了什么?
require 'test_helper'
class CreatingSomeStuff < ActionDispatch::IntegrationTest
setup do
Capybara.current_driver = :webkit
end
context 'When viewing some stuff' do
setup do
@some_url = 'http://www.google.com'
visit("/stuff?url=#{@some_url}")
end
end
end