Ruby 1.9.3-p286 を使用した Rails 3.1 アプリがあります。ApplicationController の前のフィルターの 1 つで、私は持っていますsession_create_params = {deviceId: cookies.signed[:device_id]}
いくつかの統合テストを呼び出すと、undefined method [ ]' for nil:NilClass
Cookie が nil のように見えます。これを修正するにはどうすればよいですか、または私が間違っていることを教えてください。
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