I thought if you didn’t use Rails sessions, that Rails wouldn’t create a session cookie?
In any event, one of our engineers had put together a simple Rack middleware for destroying cookies.
You can find the code for cookie_monster.rb as a Gist on GitHub.
If this helps you, great. I’d also like to understand why a session cookie gets created? It seems like it’s happening in the bowels of Rails. This is a Rails 2.3.8 application by-the-dubz.
The other day we ran into an issue in one of our new Rails 3 apps that is using mocha for mocking. It seemed that once a stub was mocked in one test, it would carry over to each subsequent test causing failures. Mocks were not being torn down correctly… Since mocha does not lie, it had to be something within our setup causing it to fail…
Thankfully, a tweet response from @elise_huard offered the following solution: