[rspec-users] Cookies - how to set in controller specs?
cdemyanovich at gmail.com
Wed Jul 2 14:44:01 EDT 2008
> I'm thinking of replacing the existing cookies() method (in the example)
> with one that returns a CookieJarProxy that will allow you to do any of the
> cookies['cookie_key'] = 'cookie value'
> cookies[:cookie_key] = 'cookie value'
> cookies['cookie_key'].should == 'cookie value'
> cookies[:cookie_key].should == 'cookie value'
> WDYT about that?
David, do you plan to allow checks that other values are set as we'd
expect? Other values include:
For example, I'd like to verify that I update the value and expiration date:
it "resets the cookie with the value and new expiration date" do
cookies[:project_sort][:value].should == "name"
More information about the rspec-users