开发者

uninitialized constant UsersController with devise and rspec

开发者 https://www.devze.com 2023-03-18 07:41 出处:网络
I have configured a new rails 3 app, with devise and rspec. I have followed the devise wiki, and put

I have configured a new rails 3 app, with devise and rspec. I have followed the devise wiki, and put

RSpec.configure do |config|
  config.include Devise::TestHelpers, :type => :controller
end

in spec/spec_helper.rb. Anyways, when I try to run the controllers spec, I have th开发者_如何学JAVAe error :

spec/controllers/users_controller_spec.rb:3:in `<top (required)>': uninitialized constant UsersController (NameError)

Sounds like devise engine classes are not available in loadpath while testing. Any idea ?


UserController might be missing.

If not, can you paste it here?

0

精彩评论

暂无评论...
验证码 换一张
取 消