[rspec-users] Test Rendering nothing in Rails

Shane Mingins smingins at elctech.com
Wed Aug 1 18:54:16 EDT 2007


ok ... went with     response.body.should == " "


On 2/08/2007, at 10:47 AM, Shane Mingins wrote:

> Hi
>
> In a controller I have method that is accessed via an AJAX call and  
> will conditionally do:
>
> render :nothing => true
>
> to test the condition hitting this line I was hoping to do  
> something like:
>
> response.should render_template(:nothing)
>
> How should I test this behaviour?
>
> Cheers
> Shane
>

r
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070802/e98cf247/attachment.html 


More information about the rspec-users mailing list