2010-03-09

testing cookies with rails 2.3

At first I was doing this, in order to make a test pass.

@request.cookies[:foo] = 'bar'

It wouldn't work. After just spending a weekend hitting my head against a wall with this, the solution turned out to be simple.

@request.cookies['foo'] = 'bar'

'foo' not :foo -- argh!

No comments: