Wednesday, May 4, 2011

Testing Extended Devise Controllers

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:


Checking the devise filters helped with some direction:

Have fun !!


Shlomo said...

Brilliant. Thanks.

Amit Kumar said...

Glad this helped you.. !!