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
Written by Ed
Related protips
1 Response
expect(response.body).to be_blank
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#