[rspec-users] Cookies - how to set in controller specs?
dchelimsky at gmail.com
Wed Jul 2 14:45:13 EDT 2008
On Jul 2, 2008, at 1:44 PM, Craig Demyanovich wrote:
>> I'm thinking of replacing the existing cookies() method (in the
>> 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:
> * :value
> * :path
> * :domain
> * :expires
> * :secure
> * :http_only
> 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"
> cookies[:project_sort][:expires].beginning_of_day.should ==
I had not planned that, no :)
Let me get the basics working first and we can talk about beefing it
up like this later.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users