Testing Devise Authentication Helper Deprecation in heartcombo/devise
This test helper module for Devise authentication framework provides deprecated test functionality for controller testing. It manages the transition from legacy TestHelpers to the newer ControllerHelpers implementation while maintaining backward compatibility.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
heartcombo/devise
lib/devise/test_helpers.rb
# frozen_string_literal: true
module Devise
module TestHelpers
def self.included(base)
base.class_eval do
Devise.deprecator.warn <<-DEPRECATION.strip_heredoc
[Devise] including `Devise::TestHelpers` is deprecated and will be removed from Devise.
For controller tests, please include `Devise::Test::ControllerHelpers` instead.
DEPRECATION
include Devise::Test::ControllerHelpers
end
end
end
end