Last Updated: September 29, 2021
·
6.582K
· errm

render :nothing => true

Spec it like this:

describe "#show" do
  it "renders nothing"
    get :show
    response.body.should be_blank
  end
end

In the controller:

def show
  render :nothing => true
end

1 Response
Add your response

expect(response.body).to be_blank
over 1 year ago ·