I''m using acts_as_authenticated, and I''m trying to run some tests where the user must be registered. In the past, I''ve just included a user id in the session data. def test_login_loads_from_post_session post :new, nil, { :user => 7 } session = assigns(:session) assert_equal 7, session[:user] end My assert statement seems to be failing because my session is not showing me as being logged in. Executing break point at /Users/intention/work/idm_local/config/../lib/authenticated_system.rb:52 in `login_required'' irb(#<LinksController:0x2481fec>):001:0> session => #<ActionController::TestSession:0x24805fc @attributes={:user=>7, "flash"=>{}}, saved_attributesnil, session_id"" irb(#<LinksController:0x2481fec>):002:0> session[:user] => nil What I don''t understand is why I can''t access the attributes that are listed in the session object. You can see that the @attributes hash has the value 7 for the key :user. What am I doing wrong? thanks, Bryan -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---