views:

387

answers:

1

Hello,

I would like to write some unit test with a logged user using Authlogic. To start right, I used some code hosted in http://github.com/binarylogic/authlogic_example. But I get an error after rake test, because of "test_helper.rb" and the following class:

class ActionController::TestCase
  setup :activate_authlogic
end

Here is my error:

NameError: undefined local variable or method `activate_authlogic' for

I think this Authlogic example is mapped over Rails 2; maybe it's a little bit different on Rails 3. Is there an other example where I can take example about unit test?

Many thanks.

+2  A: 

Do you require 'authlogic/test_case' and include Authlogic::TestCase? I had a similar issue (using rspec, though) and read through the code at http://github.com/trevmex/authlogic_rails3_example

Martin Svalin