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
>
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[:
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