This project is archived and is in readonly mode.

#6272 ✓resolved
Marko Anastasov

Cookie value set in functional test, key present in controller but unreadable

Reported by Marko Anastasov | January 10th, 2011 @ 02:19 PM | in 3.0.6

Initially I posted a message on rspec-users, but was told[0] that this sounds like a Rails bug.

I set a value in controller spec using @request.cookies:

but when the controller reads it, it's nil somehow, even though the key is present, as this screenshot from the debugger shows:

This happens in test environment only. Eventually I figured out that I can use request.cookies in controller to make it work. But it's strange that I need to.

I'm using RSpec 2.4 and Rails 3.0.3.


Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by