Spec Out Your Cookies with Rspec

Here’s something that got me this weekend and I couldn’t find much info on it anywhere. So like my Internet taught me, I’m sharing.



Here I’m making the expectation that a cookie will be set with the key of ‘phone’ and a value of a passed in parameter.
My do_post method takes care of the post and passes in the parameter :phone => '804-755-7555'.