toamitkumar's Code Blog

Ruby, Rails, RubyMotion, Chef, Puppet, Play and others. Opinions expressed here are my own and do not reflect those of my employer.

Testing Extended Devise Controllers

| Comments

Devise has become the de-facto library if you ever need Authentication. Tonnes of pluggable components which you can easily enable/disable.
For our application we had to reset session and easiest and cleanest way to do was to extend the devise - SessionsController:



For testing this piece:



With smiling face I ran the spec buuuuuuttttttttttttttttt arrrrggghhhh:

AbstractController::ActionNotFound


Checking the devise filters helped with some direction:



Have fun !!

Comments

Amit Kumar
Glad this helped you.. !!
Shlomo
Brilliant. Thanks.

Comments