Alex Leasenco
2012-Dec-13 12:06 UTC
[rspec-users] how to check with rspec if controller action set needed instance variables ?
def view_task @task = params[:task] @back_to = view_path(@camp) end Thanks Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20121213/01589f57/attachment.html>
Andy Lindeman
2012-Dec-13 15:05 UTC
[rspec-users] how to check with rspec if controller action set needed instance variables ?
On Thu, Dec 13, 2012 at 7:06 AM, Alex Leasenco <alexwebscom at gmail.com> wrote:> def view_task > @task = params[:task] > @back_to = view_path(@camp) > end > > ThanksIn 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/
Alex
2012-Dec-13 16:15 UTC
[rspec-users] how to check with rspec if controller action set needed instance variables ?
Thanks Andy for your help On Thursday, December 13, 2012 5:05:45 PM UTC+2, Andy Lindeman wrote:> > On Thu, Dec 13, 2012 at 7:06 AM, Alex Leasenco <alexw... at gmail.com<javascript:>> > wrote: > > def view_task > > @task = params[:task] > > @back_to = view_path(@camp) > > end > > > > Thanks > > 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... at rubyforge.org <javascript:> > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20121213/372def86/attachment.html>