This code demonstrates how rails breaks between 2 commits on setting cookies through AMF gateway.
To run the test, you need to start 2 consoles, one for rails server and another for testing.
On one console, do
bundle rails s
On another console, do
actionpack/lib/action_dispatch/middleware/flash.rb:Flash#call, prepend the following code
session = env['rack.session'] session[:test]
Or in the latest version
session = Request::Session.find(env) session[:test]
And the test passes.