Closed mikehale closed 8 months ago
Hey just make it like:
Devise.setup do |config|
config.secret_key = ENV['DEVISE_SECRET_KEY']
end
Good idea. This worked for me:
Devise.setup do |config|
config.secret_key = '' if Rails.env.test?
end
Environment
Current behavior
I see a deprecation warning when running tests. This should be reproducible on any rails 7.1 install with devise.
Expected behavior
No deprecation warning when running tests locally.
I think the https://github.com/heartcombo/devise/blob/main/lib/devise/secret_key_finder.rb will need to be updated to not attempt to call
application.secrets
, before callingapplication.config.secret_key_base
(which is what development and test) seem to defer to.