In test_helper.rb you usually put all the global methods and data required, so it looks typically fine to me.
Kristian Hellquist 2009/12/5 sanjanad <[email protected]>: > > > is it ok if i define my login_as in test_helper.rb ??? > > def login_as(admin) > @request.session[:admins] = admin ? admins(admin).id : nil > end > > and then use login_as:sanj > > in my functional tests..it does not show any errors...but is it > logically correct?? > > -- > > 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. > > > -- 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.

