rails/rails — Issue #4999: integration test: setting a session does not create _foo_session cookie
Author: mikehoward
Created: 2012-02-10 22:33:49+00:00
State: open

Rails 3.2.1

In writing an integration test, if I set a session key (session[:key] = 'value'), no cookie is set with the session id.

Not coincidently a subsequent request flushes the session hash.

More succinctly:

get 'path'
session[:foo] = 'bar'
puts session -> { :foo => 'bar' }

get 'other-path'
puts session -> {}

Thanks