mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-08 22:37:57 -05:00
Add deprecator to the application's deprecators
This commit is contained in:
@@ -17,6 +17,10 @@ module Devise
|
||||
app.reload_routes! if Devise.reload_routes
|
||||
end
|
||||
|
||||
initializer "devise.deprecator" do |app|
|
||||
app.deprecators[:devise] = Devise.deprecator if app.respond_to?(:deprecators)
|
||||
end
|
||||
|
||||
initializer "devise.url_helpers" do
|
||||
Devise.include_helpers(Devise::Controllers)
|
||||
end
|
||||
|
||||
@@ -8,4 +8,10 @@ class RailsTest < ActiveSupport::TestCase
|
||||
assert_equal :load_config_initializers, initializer.after
|
||||
assert_equal :build_middleware_stack, initializer.before
|
||||
end
|
||||
|
||||
if Devise::Test.rails71_and_up?
|
||||
test 'deprecator is added to application deprecators' do
|
||||
assert_not_nil Rails.application.deprecators[:devise]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user