Testing cookies.permanent.signed

Hi,

When using:

def some_action
cookies.permanent.signed[:cookie_name] = “somevalue”
end

How do I test it in functional tests?

I’m trying to user:

assert_equal “somevalue”, cookies.permanent.signed[:cookie_name] but
I’m getting

NoMethodError: undefined method `permanent’ for #Hash:0x9955598

Thanks,


Joo Miguel Pereira

Anyone knows how to test cookies.permanent?

On Feb 8, 2011 5:36 PM, “Joo P.” [email protected]
wrote:

Hi,

When using:

def some_action
cookies.permanent.signed[:cookie_name] = “somevalue”
end

How do I test it in functional tests?

I’m trying to user:

assert_equal “somevalue”, cookies.permanent.signed[:cookie_name] but
I’m getting

NoMethodError: undefined method `permanent’ for #Hash:0x9955598

Thanks,


Joo Miguel Pereira
http://jpereira.eu

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs