diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 21:10:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 21:10:34 +0300 |
commit | 5842aa35563dacaabf9a80307966fabe366a1321 (patch) | |
tree | 76a34e30f26c3e0f44410cadc308c301d49858ce /spec/rubocop | |
parent | f4ad4d190044bd14fe4caec25b1a219887bc752f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/avoid_return_from_blocks_spec.rb | 10 | ||||
-rw-r--r-- | spec/rubocop/cop/graphql/id_type_spec.rb | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/rubocop/cop/avoid_return_from_blocks_spec.rb b/spec/rubocop/cop/avoid_return_from_blocks_spec.rb index e35705ae791..1b41e140454 100644 --- a/spec/rubocop/cop/avoid_return_from_blocks_spec.rb +++ b/spec/rubocop/cop/avoid_return_from_blocks_spec.rb @@ -41,10 +41,10 @@ RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do RUBY end - shared_examples 'examples with whitelisted method' do |whitelisted_method| - it "doesn't flag violation for return inside #{whitelisted_method}" do + shared_examples 'examples with allowlisted method' do |allowlisted_method| + it "doesn't flag violation for return inside #{allowlisted_method}" do expect_no_offenses(<<~RUBY) - items.#{whitelisted_method} do |item| + items.#{allowlisted_method} do |item| do_something return if something_else end @@ -52,8 +52,8 @@ RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do end end - %i[each each_filename times loop].each do |whitelisted_method| - it_behaves_like 'examples with whitelisted method', whitelisted_method + %i[each each_filename times loop].each do |allowlisted_method| + it_behaves_like 'examples with allowlisted method', allowlisted_method end shared_examples 'examples with def methods' do |def_method| diff --git a/spec/rubocop/cop/graphql/id_type_spec.rb b/spec/rubocop/cop/graphql/id_type_spec.rb index 3a56753d39e..6eb4890c064 100644 --- a/spec/rubocop/cop/graphql/id_type_spec.rb +++ b/spec/rubocop/cop/graphql/id_type_spec.rb @@ -12,8 +12,8 @@ RSpec.describe RuboCop::Cop::Graphql::IDType do TYPE end - context 'whitelisted arguments' do - RuboCop::Cop::Graphql::IDType::WHITELISTED_ARGUMENTS.each do |arg| + context 'allowlisted arguments' do + RuboCop::Cop::Graphql::IDType::ALLOWLISTED_ARGUMENTS.each do |arg| it "does not add an offense for calls to #argument with #{arg} as argument name" do expect_no_offenses(<<~TYPE.strip) argument #{arg}, GraphQL::Types::ID, some: other, params: do_not_matter |