Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Testing with Rails 6.1 #16

Open
sFrenkie opened this issue Oct 25, 2021 · 0 comments
Open

Testing with Rails 6.1 #16

sFrenkie opened this issue Oct 25, 2021 · 0 comments

Comments

@sFrenkie
Copy link

At first thank all to make this gem.

Maybe I need more helps than it's bug.
After upgrade to Rails 6.1
I hit the issue wher url_for method don't know the route

ActionView::Template::Error:
  No route matches {:locale=>:en}

There are missing like controller and action in params.
I tried to update rspec settings to add

config.include Devise::Test::ControllerHelpers, type: :reflex
config.include Devise::Test::IntegrationHelpers, type: :reflex

But I hit the

undefined method `env' for nil:NilClass

Which shows that @request is nil. Adding lines above should solve same issue for rspec with Capybara and testing controller.
https://stackoverflow.com/questions/27284657/undefined-method-env-for-nilnilclass-in-setup-controller-for-warden-error
https://stackoverflow.com/questions/27654786/nomethoderror-undefined-method-env-for-nilnilclass
https://stackoverflow.com/questions/21506814/nomethoderror-undefined-method-env-for-nilnilclass-in-actionmailertestcase
and more similar issues but for request or Capybara

How can I fix or mock or whatever to do for reflex? Tips are welcome, thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant