Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
pothibo opened this Issue · 3 comments

2 participants

@pothibo

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
Owner
@josevalim josevalim closed this
@pothibo

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
end

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
@pothibo

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.