我正在尝试将数据保存在cookies上,以便以后使用。def hello cookies[:cookies_name] = nameend
logger.debug"The number of lines in specific is updr #{cookies[:cookies_name] }"end
在操作process_file中,
cookies[:first_time].nil?end 尝试的Rspec测试 it "returns true if the cookie is set" do helper.first_time().should be(true)
end 错误: undefined method `cookies' for nil:NilClass 我读到的所有关于Rspec和cookies的东西都与控制器有