Saturday 4 November 2017

[Solved] Deprecation warnings Devise::TestHelpers

Another entry in the series of 'notes to myself' here.
A simple fix for the Deprecation warning saying that Devise::TestHelpers will be removed.
The fix is to replace the
 config.include Devise::Test::Helpers, :type => :controller  
with
config.include Devise::Test::ControllerHelpers, :type => :controller  
in spec/rails_helper.rb.
Unlike many of the suggested solutions, I don't have the devise configuration in the rails_helper file.
I have a separate set of helper functions, and the relevant location is 
spec/support/devise.rb.
 RSpec.configure do |config|  
  config.include Devise::Test::ControllerHelpers, :type => :controller  
 end  



You can stop reading now and go do something more productive instead.