*assigns* - _Any objects that are stored as instance variables in actions for use in views._ (http://guides.rubyonrails.org/testing.html#the-four-hashes-of-the-apocalypse) I have a code :- test "should update line_item" do patch :update, id:@line_item, line_item: { cart_id:@line_item.cart_id, product_id:@line_item.product_id} assert_redirected_to line_item_path(assigns(:line_item)) end Does *assigns(:line_item)* give back an instance of the model _LineItem_ ? I am bit confused with the use of the method *assigns*. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/364efc25e64f82e93c322cb14e90a185%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.