- 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

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -