- Where Developers Learn, Share, & Build Careers
I am trying to test for cookies in my request:
The 'spec_helper' 'description of cookies' should be set correctly '' request.cookies ['foo'] = 'bar' and end but it will give me the Undefined method returns 'cookies': NilClass . How do I fix it?
request object will be zero inside you test case unless you have a method < Do not request to use any of the code> get , post , delete , put , etc. . For example, if you get root_path before request.cookies ['foo'] = 'bar' then your code works Will do
Comments
Post a Comment