[rspec-users] rspec and cookies

David Green justnothing at tiscali.co.uk
Mon Jan 29 04:30:13 EST 2007


can anyone tell me how to test cookies using rspec? specifically, I'd like
to be able to set a cookie before a get/post request and also to test the
cookies which have been set by a get/post request

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] 

View this message in context: http://www.nabble.com/rspec-and-cookies-tf3134883.html#a8686339
Sent from the rspec-users mailing list archive at Nabble.com.

More information about the rspec-users mailing list