Instantiating Controller Object on Rails3 for unit testing

Dear all,

I am experiencing this error when doing unit testing:
Authlogic::Session::Activation::NotActivatedError: You must activate
the Authlogic::Session::Base.controller with a controller object
before creating objects

I know this is not an error from Rails but I encounter this when doing
unit testing in Rails. This error happenned because my model has
dependencies to 3rd Party library named Authlogic to get the current
logged in user. Can anybody suggest what would be the best way to
instantiate controller object, when 3rd party library requires a
controller object to be instantiated?

Thank you very much in advance for your help.

Kind regards,


http://twitter.com/scrum8

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs