How to use session when testing in RSpec?

Hey all.

I’m using RSpec with Hanami 1.3, and I’m hitting a wall on how to integrate sessions into action testing. In this specific case, I’m using Warden for authentication, and I want to test permissions for the currently logged in user. What’s the best way to integrate that in with the action params? I haven’t found any documentation on this.

Hey!

You can check this spec file for using session attributes in action testing:

Hope it will helpful for you