Browse Source

Autofix Rubocop Style/MethodCallWithoutArgsParentheses (#23645)

closed-social-glitch-2
Nick Schonning 1 year ago
committed by GitHub
parent
commit
37914c8757
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 14 deletions
  1. +0
    -8
      .rubocop_todo.yml
  2. +4
    -4
      spec/services/activitypub/process_collection_service_spec.rb
  3. +2
    -2
      spec/services/fetch_resource_service_spec.rb

+ 0
- 8
.rubocop_todo.yml View File

@ -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.

+ 4
- 4
spec/services/activitypub/process_collection_service_spec.rb View File

@ -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' => '<p>puck was here</p>'
)
),
anything(),
anything()
anything,
anything
)
subject.call(json, forwarder)

+ 2
- 2
spec/services/fetch_resource_service_spec.rb View File

@ -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)

Loading…
Cancel
Save