Autofix Rubocop Style/MethodCallWithoutArgsParentheses (#23645)

This commit is contained in:
Nick Schonning 2023-02-17 07:36:14 -05:00 committed by GitHub
parent 4a1bad2fd8
commit 37914c8757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 14 deletions

View file

@ -3432,14 +3432,6 @@ Style/MapToHash:
Exclude: Exclude:
- 'app/models/status.rb' - '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 # Offense count: 17
# This cop supports unsafe autocorrection (--autocorrect-all). # This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.

View file

@ -212,8 +212,8 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do
'id' => 'https://example.com/users/bob/fake-status' 'id' => 'https://example.com/users/bob/fake-status'
) )
), ),
anything(), anything,
anything() anything
) )
expect(ActivityPub::Activity).not_to receive(:factory).with( expect(ActivityPub::Activity).not_to receive(:factory).with(
@ -222,8 +222,8 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do
'content' => '<p>puck was here</p>' 'content' => '<p>puck was here</p>'
) )
), ),
anything(), anything,
anything() anything
) )
subject.call(json, forwarder) subject.call(json, forwarder)

View file

@ -21,7 +21,7 @@ RSpec.describe FetchResourceService, type: :service do
context 'when OpenSSL::SSL::SSLError is raised' do context 'when OpenSSL::SSL::SSLError is raised' do
before do before do
request = double() request = double
allow(Request).to receive(:new).and_return(request) allow(Request).to receive(:new).and_return(request)
allow(request).to receive(:add_headers) allow(request).to receive(:add_headers)
allow(request).to receive(:on_behalf_of) allow(request).to receive(:on_behalf_of)
@ -33,7 +33,7 @@ RSpec.describe FetchResourceService, type: :service do
context 'when HTTP::ConnectionError is raised' do context 'when HTTP::ConnectionError is raised' do
before do before do
request = double() request = double
allow(Request).to receive(:new).and_return(request) allow(Request).to receive(:new).and_return(request)
allow(request).to receive(:add_headers) allow(request).to receive(:add_headers)
allow(request).to receive(:on_behalf_of) allow(request).to receive(:on_behalf_of)