-
Couldn't load subscription status.
- Fork 5.5k
Open
Description
I am still running into this issue even after the merge of a related fix
Environment
- Ruby 3.4
- Rails 8.0.2
- Devise 4.9.4
Test setup
- RSpec with fixtures (users.yml)
- devise_for :users is already set in routes
- Integration and Controller helpers are configured in rails_helper
Error on running on controller tests
RuntimeError:
Could not find a valid mapping for #<User id: ...
Solution that worked for me
Add to spec_helper
# TODO Remove when Devise fixes https://github.com/heartcombo/devise/issues/5705
config.before(:each, type: :controller) do
Rails.application.reload_routes_unless_loaded
end
end
paulwalrath
Metadata
Metadata
Assignees
Labels
No labels