随笔 - 397  文章 - 3  评论 - 16  阅读 - 32万

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

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

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

  

posted on   c3tc3tc3t  阅读(428)  评论(0编辑  收藏  举报
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示