In trying to test some sign-in/out functionality I want to delete some information from the session. I found out I couldn\'t access the sessions at all. I kept getting the
You are testing two different things. In the first test you test a Rails controller, so RSpec adds helpers like session for you. In the second test, you're in a request test, so RSpec does not add any controller related helpers.
UPDATE
I have not tested this, but looking at the source code I think this should suffice
include ::RSpec::Rails::ControllerExampleGroup
For more info check out the rspec-rails project on github.
UPDATE 2
You should not test for cookies in request specs, quoting the RSpec docs:
Request specs provide a thin wrapper around Rails' integration tests, and are designed to drive behavior through the full stack, including routing (provided by Rails) and without stubbing (that's up to you).