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?
精彩评论