devise: v4.6.0 breaks rspec controller tests
Environment
- Ruby 2.4.5
- Rails 4.2.7
- Devise 4.6.0
Current behavior
I just updated to 4.6.0 (no other changes were made) and the rspec controller tests now return undefined method root_path after running a sign_in.
4.5.0 does not exhibit this behaviour.
Expected behavior
root_path should return a value.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 25 (7 by maintainers)
Commits related to this issue
- Check if `root_path` is defined with `#respond_to?` instead of `#present?` When an application does not define a `root`, the method will be undefined instead of returning a falsey value. This commit ... — committed to heartcombo/devise by tegon 5 years ago
- Check if `root_path` is defined with `#respond_to?` instead of `#present` (#5022) When an application does not define a `root`, the method will be undefined instead of returning a falsey value. Thi... — committed to heartcombo/devise by tegon 5 years ago
@erich-team Since this broke a lot of existing applications like yours, we decided to roll back the original change. If you want to return to the original behavior you can update to version
4.6.2.Thanks!
@tegon this is probably a good time for me to go back and DRY up my tests anyway. Things have got messy over time. Thanks for you thoughts and rapid response to this issue. I’ll close it now.