Helper Devise: could not find the `Warden::Proxy` instance on request environment

在使用devise这个gem时,编写控制器层的单元测试,你需要在你的rspec帮助文件 rails_helper.rb里添加下面这一样

RSpec.configure do |config|
  config.include Devise::Test::ControllerHelpers, type: :controller
end

  

原文地址:https://www.cnblogs.com/or2-/p/6673727.html