I must admit I am having difficulty finding documentaion on this. I got it from section 13.3 (Functional Testing) of Agile Development With Rails (Pragmatic Bookshelf) and it certainly works. When you say it doesn't work was there an error or did the login simulation not work?
2009/1/20 John Small <[email protected]> > > Colin Law wrote: > > In functional tests get, put etc take a third parameter which allows > > session > > data to be setup. Thus one can say: > > def test_show > > get :show, {:id => @first_id}, { :user_id => > > users(:user_name_from_fixture).id } > > ... > > > > This sets the user_id in the session and allows restful_authentication > > to > > login and setup current_user > > This would be great except that it doesn't work for me. > > Where is the documentation on the params get, put etc take, or is it > something you have to "just know"? > > I've checked the http://rails.rubyonrails.com/ > actioncontroller::TestCase docs and there's no mention of any of these > methods. None of the 'get' methods mentioned in the list of methods > doesn't seem to match the context of functional testing they're being > used in so how they work is just magic. What incantations are required? > > I'm using Rails 2.2.2 > > John Small > > > -- > 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 [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 -~----------~----~----~----~------~----~------~--~---

