In a Cucumber step definition, I'm trying to login, but I keep getting
this error:

You must activate the Authlogic::Session::Base.controller with a
controller object before creating objects
(Authlogic::Session::Activation::NotActivatedError)

My code:

Given /^I am the logged in (.+) "(.+)"$/ do |role, login|
  user = User.create!(
    :login => login,
    :password => "some_password",
    :password_confirmation => "some_password",
    :role => role,
    :email => "[email protected]"
  )
  #Authlogic::Session::Base.controller =
Authlogic::ControllerAdapters::RailsAdapter.new(self)
  UserSession.create(
    :login => login,
    :password => "some_password"
  )
end

I found that commented out bit - Authlogic::Session::Base.controller =
Authlogic::ControllerAdapters::RailsAdapter.new(self) - online, but it
leads to "save" not working.

Assistance greatly appreciated!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to