class DeviseController
def assert_is_devise_resource! #:nodoc:
Checks whether it's a devise mapped resource or not.
def assert_is_devise_resource! #:nodoc: unknown_action! <<-MESSAGE unless devise_mapping uld not find devise mapping for path #{request.fullpath.inspect}. is may happen for two reasons: You forgot to wrap your route inside the scope block. For example: devise_scope :user do get "/some/route" => "some_devise_controller" end You are testing a Devise controller bypassing the router. If so, you can explicitly tell Devise which mapping to use: @request.env["devise.mapping"] = Devise.mappings[:user] SSAGE end