2
votes

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 the 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 ?

1
Answer to myself, add a file app/controllers/users_controller.rb : class UsersController < ApplicationController ; endGravis

1 Answers

0
votes

UserController might be missing.

If not, can you paste it here?