[rspec-users] how to check with rspec if controller action set needed instance variables ?

74 views
Skip to first unread message

Alex Leasenco

unread,
Dec 13, 2012, 7:06:04 AM12/13/12
to rspec...@rubyforge.org
def view_task
 @task = params[:task]
 @back_to = view_path(@camp)
end

Thanks
Alex

Andy Lindeman

unread,
Dec 13, 2012, 10:05:45 AM12/13/12
to rspec-users
In your specs, these are accessible via assigns(:task) and assigns(:back_to)

More details: <https://www.relishapp.com/rspec/rspec-rails/v/2-12/docs/controller-specs>

--
Andy Lindeman
http://www.andylindeman.com/
_______________________________________________
rspec-users mailing list
rspec...@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Alex

unread,
Dec 13, 2012, 11:15:36 AM12/13/12
to rs...@googlegroups.com, rspec-users
Thanks Andy for your help
Reply all
Reply to author
Forward
0 new messages