Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Need to map route so devise works in functional tests #1895

pothibo opened this Issue · 3 comments

2 participants


I'm using ruby 1.9.3 and rails 3.2.3 and everytime I want to use devise, I need to add this to my setup method:

@request.env["devise.mapping"] = Devise.mappings[:user]

any reason why this is happening?

@josevalim josevalim closed this

Well this is mentionned nowhere in the documentation, I had to browse the web for 3 hours to finally figure out I had to do this.... The way it is explained in the doc mislead me to think that adding

class ActionController::TestCase
  include Devise::TestHelpers

Was the only needed step. This is why I opened this issue, since I believe it should be mentionned in the README

@josevalim josevalim reopened this
@josevalim josevalim closed this in 985b646

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.