i defined in the setup some session variables
def setup
@controller = RecommandationsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@request.session[:user] = users(:arthur) #2
@request.session[:city] = villes(:auray)
@request.session[:infos_list] Ouroboros.from_a(villes(:auray).infos)
end
I would like to change some of these session variables in the same test
before the posts, is it possible ?
ot should I actually write 3 tests ?
test_create
post :create, :id => ''100'', :comment =>
"ok...", :notation => ''3''
...
@request.session[:user] = users(:caroline) #16
post :create, :id => ''100'', :comment =>
"ok...", :notation => ''3''
...
@request.session[:user] = users(:clementine) #5
post :create, :id => ''100'', :comment =>
"ok...", :notation => ''3''
thanks for your comments
--
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
-~----------~----~----~----~------~----~------~--~---