module AuthenticationHelpers
  def sign_in_as!(user)
    visit '/login'
    fill_in 'Email', with: user.email
    fill_in 'Password', with: 'secret'
    click_button 'Login'
  end
end

RSpec.configure do |config|
  config.include AuthenticationHelpers, type: :feature
  config.include Devise::TestHelpers,   type: :controller
  config.include Rack::Test::Methods,   type: :feature
end

module AuthenticationHelpers
  def sign_in_as!(user)
    visit '/login'
    fill_in 'Email', with: user.email
    fill_in 'Password', with: 'secret'
    click_button 'Login'
  end
end

RSpec.configure do |config|
  config.include AuthenticationHelpers, type: :feature
  config.include Devise::Test::ControllerHelpers, type: :controller
  config.include Rack::Test::Methods, type: :feature
end

Correct Devise test helpers deprecation warning
Correct Devise test helpers deprecation warning

Example deprecation warning:

  DEPRECATION WARNING: [Devise] including `Devise::TestHelpers` is deprecated and will be removed from Devise.
  For controller tests, please include `Devise::Test::ControllerHelpers` instead.
  (called from <top (required)> at /home/andrew/dev/solidus_auth_devise/spec/controllers/spree/checkout_controller_spec.rb:1)
