Hi Pat,

'response.body.should be_empty" does not work :(

The string on the response after a "render :nothing" is " " (one space
character), so i had to do a strip to make it work. I guess i'll write
my own render_nothing matcher anyway. Here's how it is now:

      @assignments.should_receive( :find ).and_return( [ @assignment ] )
      @assignments.should_not_receive( :create )
      do_xhr
      response.should be_success
      response.body.strip.should be_empty

On Sat, Jun 7, 2008 at 1:27 PM, Pat Maddox <[EMAIL PROTECTED]> wrote:
>
> I'm pretty sure you can do
> response.body.should be_blank # or == ""
>
> If you don't like how it reads, you could create a custom
> render_nothing matcher.
>
> Pat


-- 
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to