From a64bdfb264b6dde9fee8a6550868604da77a9e3f Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Tue, 16 Aug 2016 18:36:39 -0700 Subject: [PATCH] Avoid deprecated :nothing option Fixes #907 --- .../curation_concerns/generic_works_controller_spec.rb | 2 +- spec/controllers/downloads_controller_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/controllers/curation_concerns/generic_works_controller_spec.rb b/spec/controllers/curation_concerns/generic_works_controller_spec.rb index ef5425325..5ad066f0b 100644 --- a/spec/controllers/curation_concerns/generic_works_controller_spec.rb +++ b/spec/controllers/curation_concerns/generic_works_controller_spec.rb @@ -71,7 +71,7 @@ context 'when a ObjectNotFoundError is raised' do it 'returns 404 page' do allow(controller).to receive(:show).and_raise(ActiveFedora::ObjectNotFoundError) - expect(controller).to receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render body: nil } get :show, params: { id: 'abc123' } end end diff --git a/spec/controllers/downloads_controller_spec.rb b/spec/controllers/downloads_controller_spec.rb index e79850cad..7c1b4d1ff 100644 --- a/spec/controllers/downloads_controller_spec.rb +++ b/spec/controllers/downloads_controller_spec.rb @@ -7,7 +7,7 @@ FactoryGirl.create(:file_with_work, user: user, content: File.open(fixture_file_path('files/image.png'))) end it 'calls render_404 if the object does not exist' do - expect(controller).to receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render body: nil } get :show, params: { id: '8675309' } end @@ -67,14 +67,14 @@ context "that isn't persisted" do it "returns 404 if the requested file does not exist" do - expect(controller).to receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render body: nil } get :show, params: { id: file_set, file: 'thumbnail' } end end end it "returns 404 if the requested association does not exist" do - expect(controller).to receive(:render_404) { controller.render nothing: true } + expect(controller).to receive(:render_404) { controller.render body: nil } get :show, params: { id: file_set, file: 'non-existant' } end end