On Fri, Aug 14, 2009 at 10:35 AM, Denis Haskin wrote:
>
> (in application_helper_spec.rb)
> it "should return false and set the cookie to true if it is not set" do
> cookies[:fp_skip_hp_video].should == nil
> skip_hp_video.should == false
> cookies[:fp_skip_hp_video].should in
Cookies continue to bedevil me in rspec.
The doc seems to imply they're supported now
(http://rspec.info/rails/changes-rspec-rails.html: "* Added proxy to
cookies so you can set them in examples the same way you set them in
controllers").
Maybe because it's because I'm trying to use them in
On Jul 2, 2008, at 1:44 PM, Craig Demyanovich wrote:
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
following:
cookies['cookie_key'] = 'cookie value'
cookies[:cookie_key] = 'cookie value'
> 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
> following:
>
> cookies['cookie_key'] = 'cookie value'
> cookies[:cookie_key] = 'cookie value'
>
> cookies['cookie_key'].should == 'cookie value'
On Jul 2, 2008, at 1:21 PM, Christopher Bailey wrote:
On Wed, Jul 2, 2008 at 10:52 AM, David Chelimsky
<[EMAIL PROTECTED]> wrote:
On Jul 2, 2008, at 12:42 PM, Christopher Bailey wrote:
First, nevermind! Oy! I finally figured it out. The reason it
wasn't working in my controller code was
On Jul 2, 2008, at 1:21 PM, Christopher Bailey wrote:
On Wed, Jul 2, 2008 at 10:52 AM, David Chelimsky
<[EMAIL PROTECTED]> wrote:
On Jul 2, 2008, at 12:42 PM, Christopher Bailey wrote:
First, nevermind! Oy! I finally figured it out. The reason it
wasn't working in my controller code was
On Wed, Jul 2, 2008 at 10:52 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Jul 2, 2008, at 12:42 PM, Christopher Bailey wrote:
>
>> First, nevermind! Oy! I finally figured it out. The reason it
>> wasn't working in my controller code was that I was checking for
>> "cookies[:cookie_key]", n
On Jul 2, 2008, at 12:42 PM, Christopher Bailey wrote:
First, nevermind! Oy! I finally figured it out. The reason it
wasn't working in my controller code was that I was checking for
"cookies[:cookie_key]", not "request.cookies[:cookie_key]"! It's a
bit strange how that manifested, given the
First, nevermind! Oy! I finally figured it out. The reason it
wasn't working in my controller code was that I was checking for
"cookies[:cookie_key]", not "request.cookies[:cookie_key]"! It's a
bit strange how that manifested, given the fact that referencing just
"cookies" was a hash with value
My pair and I struggled with this a little bit last week. We decided
to just use a hash to represent cookies in specs, since that's how
we're interacting with it. You can see the specs that we wrote here:
http://pastie.org/226443 .
Regards,
Craig
___
rsp
On Wed, Jul 2, 2008 at 9:41 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Jul 2, 2008, at 11:15 AM, Christopher Bailey wrote:
>
>> On Wed, Jul 2, 2008 at 4:06 AM, David Chelimsky <[EMAIL PROTECTED]>
>> wrote:
>>
>>>
>>> This is just one of those goofy things in Rails testing. I'm not sure
>>
On Jul 2, 2008, at 11:15 AM, Christopher Bailey wrote:
On Wed, Jul 2, 2008 at 4:06 AM, David Chelimsky
<[EMAIL PROTECTED]> wrote:
This is just one of those goofy things in Rails testing. I'm not sure
the best way to make it easier in rspec without breaking existing
examples in the process.
On Wed, Jul 2, 2008 at 4:06 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> This is just one of those goofy things in Rails testing. I'm not sure
> the best way to make it easier in rspec without breaking existing
> examples in the process. Regardless, here's how you interact with
> cookies fro
On Tue, Jul 1, 2008 at 6:37 PM, Christopher Bailey <[EMAIL PROTECTED]> wrote:
> I've been searching Google, the mailing list, etc, etc. and can't for
> the life of me get a cookie to be set in a controller spec. From
> everything I've read on the web, it appears all I need to do is the
> typical:
I've been searching Google, the mailing list, etc, etc. and can't for
the life of me get a cookie to be set in a controller spec. From
everything I've read on the web, it appears all I need to do is the
typical:
cookies[:name] = value
or
cookies[:name] = { :value => something, :expires => 1
On 10/4/07, Nathan Sutton <[EMAIL PROTECTED]> wrote:
> So how do you work with cookies properly in rspec now? I noticed in
> the docs that it mentions session, assigns, and flash, but nothing of
> cookie. I'm using edge rails so I'm concerned about changes to the
> cookie mechanisms. I need to a
So how do you work with cookies properly in rspec now? I noticed in
the docs that it mentions session, assigns, and flash, but nothing of
cookie. I'm using edge rails so I'm concerned about changes to the
cookie mechanisms. I need to assign values into the cookie (a
remember token for re
17 matches
Mail list logo