开发者

uninitialized constant UsersController with devise and rspec

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜