[rspec-users] Match render :nothing

Pat Maddox pergesu at gmail.com
Sat Jun 7 12:27:16 EDT 2008

On Sat, Jun 7, 2008 at 9:23 AM, Maurício Linhares
<mauricio.linhares at gmail.com> wrote:
> Hello guys,
> Is there any way to match a render :nothing?
> I coudn't find any way to do this so i've just changed my controllers
> to do a "head :ok", but it would be nice to know if there is any other
> way :)

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.


More information about the rspec-users mailing list