diff --git a/spec/support/shared_examples_for_controller_actions.rb b/spec/support/shared_examples_for_controller_actions.rb index c064bc25..e79616ff 100644 --- a/spec/support/shared_examples_for_controller_actions.rb +++ b/spec/support/shared_examples_for_controller_actions.rb @@ -1,7 +1,7 @@ require 'spec_helper' RSpec.shared_examples_for 'a controller action' do - let(:send_request){ send verb, action, params.merge(format: :json) } + let(:send_request){ send verb, action, params: params.merge(format: :json) } it 'should authorize the action' do if authorizable diff --git a/spec/support/shared_examples_for_controller_creating.rb b/spec/support/shared_examples_for_controller_creating.rb index f953a8ab..f994c484 100644 --- a/spec/support/shared_examples_for_controller_creating.rb +++ b/spec/support/shared_examples_for_controller_creating.rb @@ -9,7 +9,7 @@ end describe '#create' do - let(:send_request){ post :create, request_params.merge(format: :json) } + let(:send_request){ post :create, params: request_params.merge(format: :json) } it 'should authorize the action' do expect_any_instance_of(subject.service_class).to receive :authorize diff --git a/spec/support/shared_examples_for_controller_rendering.rb b/spec/support/shared_examples_for_controller_rendering.rb index 1495d881..94c6b036 100644 --- a/spec/support/shared_examples_for_controller_rendering.rb +++ b/spec/support/shared_examples_for_controller_rendering.rb @@ -36,7 +36,7 @@ it 'should serialize the resource' do expect(subject.serializer_class).to receive(:resource).and_call_original - get :show, id: record.id + get :show, params: { id: record.id } end end end diff --git a/spec/support/shared_examples_for_controller_updating.rb b/spec/support/shared_examples_for_controller_updating.rb index f3ba1f2d..8b5acc25 100644 --- a/spec/support/shared_examples_for_controller_updating.rb +++ b/spec/support/shared_examples_for_controller_updating.rb @@ -12,7 +12,7 @@ end describe '#update' do - let(:send_request){ put :update, request_params.merge(format: :json) } + let(:send_request){ put :update, params: request_params.merge(format: :json) } it 'should authorize the action' do expect_any_instance_of(subject.service_class).to receive :authorize