I’ve been dabbling with Hanami and enoying it but I’ve hit an issue I can’t seem to figure out. I’ve been following and adapting this post to implement Warden into Hanami and I’ve got it working in a way I’m pretty happy with but I can’t get action specs to work.
I would love some help as I feel the way the middleware has been injected is wrong for usage within Actions and should instead be used via Deps somehow.
The relevant files in my project:
- app/actions/sessions/create.rb
- spec/actions/sessions/create_spec.rb
- config/app.rb
- config/providers/warden.rb
The error I’m getting when running the test is that request.env[“warden”] is nil even if I do a hanami.boot.
Happy to answer any more questions to help and if this is posted in the wrong spot I’m sorry!