From 936204b9eae85829c368e5877e4166faa5861fab Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Fri, 17 Feb 2023 07:43:10 -0500 Subject: [PATCH] Autofix Rubocop Style/NestedParenthesizedCalls (#23646) --- .rubocop_todo.yml | 8 -------- spec/services/post_status_service_spec.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 1a8bd9471..34143a679 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -3450,14 +3450,6 @@ Style/MutableConstant: - 'lib/mastodon/snowflake.rb' - 'spec/controllers/api/base_controller_spec.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowedMethods. -# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with -Style/NestedParenthesizedCalls: - Exclude: - - 'spec/services/post_status_service_spec.rb' - # Offense count: 7 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MinDigits, Strict, AllowedNumbers, AllowedPatterns. diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 28f20e9c7..76114a59c 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -148,7 +148,7 @@ RSpec.describe PostStatusService, type: :service do expect do subject.call(account, text: '@alice hm, @bob is really annoying lately', allowed_mentions: [mentioned_account.id]) - end.to raise_error(an_instance_of(PostStatusService::UnexpectedMentionsError).and having_attributes(accounts: [unexpected_mentioned_account])) + end.to raise_error(an_instance_of(PostStatusService::UnexpectedMentionsError).and(having_attributes(accounts: [unexpected_mentioned_account]))) end it 'processes duplicate mentions correctly' do