Re: [rspec-users] rescue

2008-03-19 Thread Jonathan Linowes
yep, that did it :) thx On Mar 18, 2008, at 11:50 PM, Zach Dennis wrote: On Tue, Mar 18, 2008 at 11:13 PM, linojon [EMAIL PROTECTED] wrote: Hi, whats the correct way to spec a rescue? This will raise it but doesnt test my code's response # controller def edit @foo =

[rspec-users] rescue

2008-03-18 Thread linojon
Hi, whats the correct way to spec a rescue? This will raise it but doesnt test my code's response # controller def edit @foo = Foo.find(params[:id]) rescue flash[:notice] = Unknown foo #{params[:id]} redirect_to foos_path end # spec it should flash error if not found

Re: [rspec-users] rescue

2008-03-18 Thread Zach Dennis
On Tue, Mar 18, 2008 at 11:13 PM, linojon [EMAIL PROTECTED] wrote: Hi, whats the correct way to spec a rescue? This will raise it but doesnt test my code's response # controller def edit @foo = Foo.find(params[:id]) rescue flash[:notice] = Unknown foo #{params[:id]}