From 37914c8757062194c8da2ede28927fdc177dc140 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Fri, 17 Feb 2023 07:36:14 -0500 Subject: [PATCH] Autofix Rubocop Style/MethodCallWithoutArgsParentheses (#23645) --- .rubocop_todo.yml | 8 -------- .../activitypub/process_collection_service_spec.rb | 8 ++++---- spec/services/fetch_resource_service_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d1d5e06122..1a8bd9471d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -3432,14 +3432,6 @@ Style/MapToHash: Exclude: - 'app/models/status.rb' -# Offense count: 6 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowedMethods, AllowedPatterns. -Style/MethodCallWithoutArgsParentheses: - Exclude: - - 'spec/services/activitypub/process_collection_service_spec.rb' - - 'spec/services/fetch_resource_service_spec.rb' - # Offense count: 17 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. diff --git a/spec/services/activitypub/process_collection_service_spec.rb b/spec/services/activitypub/process_collection_service_spec.rb index 093a188a21..a308cede76 100644 --- a/spec/services/activitypub/process_collection_service_spec.rb +++ b/spec/services/activitypub/process_collection_service_spec.rb @@ -212,8 +212,8 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do 'id' => 'https://example.com/users/bob/fake-status' ) ), - anything(), - anything() + anything, + anything ) expect(ActivityPub::Activity).not_to receive(:factory).with( @@ -222,8 +222,8 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do 'content' => '

puck was here

' ) ), - anything(), - anything() + anything, + anything ) subject.call(json, forwarder) diff --git a/spec/services/fetch_resource_service_spec.rb b/spec/services/fetch_resource_service_spec.rb index c0c96ab69c..0c0c306fe1 100644 --- a/spec/services/fetch_resource_service_spec.rb +++ b/spec/services/fetch_resource_service_spec.rb @@ -21,7 +21,7 @@ RSpec.describe FetchResourceService, type: :service do context 'when OpenSSL::SSL::SSLError is raised' do before do - request = double() + request = double allow(Request).to receive(:new).and_return(request) allow(request).to receive(:add_headers) allow(request).to receive(:on_behalf_of) @@ -33,7 +33,7 @@ RSpec.describe FetchResourceService, type: :service do context 'when HTTP::ConnectionError is raised' do before do - request = double() + request = double allow(Request).to receive(:new).and_return(request) allow(request).to receive(:add_headers) allow(request).to receive(:on_behalf_of)