[rspec-users] rspec and cookies

David Green justnothing at tiscali.co.uk
Sat Feb 10 09:43:48 EST 2007

Hello David,

2007/1/29, David Green <justnothing at tiscali.co.uk>:
> I know I can use cookies[:name] = 'value' to set a cookie but how would I
> set expiry information on such a cookie? when i try to pass a hash {:value
> => 'value', :expires => 3.days.from_now} the entire hash becomes the value
> of cookies[:name]

When the cookie comes back through the browser, it never has any
expiration or options.  The browser handles that information.  That's
why you can't set those options on the requesting side.

When responding, however... that's another story.

Hope that helps !

thanks Francois. That explains a lot.
View this message in context: http://www.nabble.com/rspec-and-cookies-tf3134883.html#a8901309
Sent from the rspec-users mailing list archive at Nabble.com.

More information about the rspec-users mailing list