Yes as Fred said you need that and suppose if you are using a session varible person_id it can be done like for example in test_helper just write a def like
def login_as(person) @request.session[:person_id] = person ? person.id : nil end And from your test call this by passing administrator object as variable Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---