Merge pull request #19124 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-3.4.0

build(deps-dev): bump rubocop-rspec from 3.3.0 to 3.4.0 in /Library/Homebrew
This commit is contained in:
Patrick Linnane 2025-01-20 23:20:08 +00:00 committed by GitHub
commit 23a8d83de5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 73 additions and 118 deletions

View File

@ -91,7 +91,7 @@ GEM
rubocop-performance (1.23.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.3.0)
rubocop-rspec (3.4.0)
rubocop (~> 1.61)
rubocop-sorbet (0.8.7)
rubocop (>= 1)

View File

@ -629,6 +629,7 @@ end
# Checks where `contain_exactly` is used.
#
# This cop checks for the following:
#
# - Prefer `match_array` when matching array values.
# - Prefer `be_empty` when using `contain_exactly` with no arguments.
#
@ -642,26 +643,26 @@ end
# # good
# it { is_expected.to contain_exactly(content, *array) }
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#22
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#23
class RuboCop::Cop::RSpec::ContainExactly < ::RuboCop::Cop::RSpec::Base
extend ::RuboCop::Cop::AutoCorrector
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#28
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#29
def on_send(node); end
private
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#44
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#45
def autocorrect_for_populated_array(node, corrector); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#36
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#37
def check_populated_collection(node); end
end
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#25
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#26
RuboCop::Cop::RSpec::ContainExactly::MSG = T.let(T.unsafe(nil), String)
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#26
# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#27
RuboCop::Cop::RSpec::ContainExactly::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# `context` should not be used for specifying methods.
@ -1324,27 +1325,27 @@ class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#97
def examples_inside_block?(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#138
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#139
def on_block(node); end
private
# @return [Boolean]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#164
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#165
def conditionals_with_examples?(body); end
# @return [Boolean]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#172
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#173
def examples_in_branches?(condition_node); end
# @return [Boolean]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#153
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#154
def offensive?(body); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#178
# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#180
def removed_range(node); end
end
@ -2371,12 +2372,6 @@ end
# describe 'test' do; end
#
# # bad
# fdescribe 'test' do; end
#
# # good
# describe 'test' do; end
#
# # bad
# shared_examples 'test', focus: true do; end
#
# # good
@ -2391,38 +2386,38 @@ end
# # bad (does not support autocorrection)
# focus 'test' do; end
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#52
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#46
class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#59
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#53
def focusable_selector?(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#77
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#71
def focused_block?(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#71
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#65
def metadata(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#81
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#75
def on_send(node); end
private
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#110
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#104
def correct_send(corrector, focus); end
# @yield [node]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#97
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#91
def focus_metadata(node, &block); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#103
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#97
def with_surrounding(focus); end
end
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#56
# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#50
RuboCop::Cop::RSpec::Focus::MSG = T.let(T.unsafe(nil), String)
# Checks the arguments passed to `before`, `around`, and `after`.
@ -3553,6 +3548,7 @@ end
# Checks where `match_array` is used.
#
# This cop checks for the following:
#
# - Prefer `contain_exactly` when matching an array with values.
# - Prefer `eq` when using `match_array` with an empty array literal.
#
@ -3569,26 +3565,26 @@ end
# # good
# it { is_expected.to match_array(%w(tremble in fear foolish mortals)) }
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#25
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#26
class RuboCop::Cop::RSpec::MatchArray < ::RuboCop::Cop::RSpec::Base
extend ::RuboCop::Cop::AutoCorrector
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#32
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#33
def match_array_with_empty_array?(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#36
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#37
def on_send(node); end
private
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#45
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#46
def check_populated_array(node); end
end
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#28
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#29
RuboCop::Cop::RSpec::MatchArray::MSG = T.let(T.unsafe(nil), String)
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#29
# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#30
RuboCop::Cop::RSpec::MatchArray::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Check that chains of messages are not being stubbed.
@ -4808,12 +4804,9 @@ class RuboCop::Cop::RSpec::PendingWithoutReason < ::RuboCop::Cop::RSpec::Base
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#82
def metadata_without_reason?(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#102
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#97
def on_send(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#98
def pending_step_without_reason?(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#93
def skipped_by_example_group_method?(param0 = T.unsafe(nil)); end
@ -4830,22 +4823,22 @@ class RuboCop::Cop::RSpec::PendingWithoutReason < ::RuboCop::Cop::RSpec::Base
# @return [Boolean]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#123
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#118
def block_node_example_group?(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#135
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#130
def on_pending_by_metadata(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#151
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#146
def on_skipped_by_example_group_method(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#141
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#136
def on_skipped_by_example_method(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#129
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#124
def on_skipped_by_in_example_method(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#116
# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#111
def parent_node(node); end
end
@ -6131,6 +6124,8 @@ end
# Sort RSpec metadata alphabetically.
#
# Only the trailing metadata is sorted.
#
# @example
# # bad
# describe 'Something', :b, :a
@ -6142,36 +6137,51 @@ end
# context 'Something', baz: true, foo: 'bar'
# it 'works', :a, :b, baz: true, foo: 'bar'
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#19
# # good, trailing metadata is sorted
# describe 'Something', 'description', :a, :b, :z
# context 'Something', :z, variable, :a, :b
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#24
class RuboCop::Cop::RSpec::SortMetadata < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::RSpec::Metadata
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#26
def on_metadata(symbols, hash); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#32
def match_ambiguous_trailing_metadata?(param0 = T.unsafe(nil)); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#36
def on_metadata(args, hash); end
private
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#38
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#58
def crime_scene(symbols, pairs); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#47
# @return [Boolean]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#54
def last_arg_could_be_a_hash?(args); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#67
def replacement(symbols, pairs); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#55
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#75
def sort_pairs(pairs); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#59
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#79
def sort_symbols(symbols); end
# @return [Boolean]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#51
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#71
def sorted?(symbols, pairs); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#49
def trailing_symbols(args); end
end
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#24
# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#29
RuboCop::Cop::RSpec::SortMetadata::MSG = T.let(T.unsafe(nil), String)
# Checks that spec file paths are consistent and well-formed.
@ -6294,35 +6304,6 @@ end
# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#24
RuboCop::Cop::RSpec::SpecFilePathSuffix::MSG = T.let(T.unsafe(nil), String)
# Do not use a string as `instance_double` constant.
#
# @example
# # bad
# instance_double('User', name: 'John')
#
# # good
# instance_double(User, name: 'John')
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#20
class RuboCop::Cop::RSpec::StringAsInstanceDoubleConstant < ::RuboCop::Cop::RSpec::Base
extend ::RuboCop::Cop::AutoCorrector
# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#39
def autocorrect(corrector, node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#31
def on_send(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#27
def stringified_instance_double_const?(param0 = T.unsafe(nil)); end
end
# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#23
RuboCop::Cop::RSpec::StringAsInstanceDoubleConstant::MSG = T.let(T.unsafe(nil), String)
# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#24
RuboCop::Cop::RSpec::StringAsInstanceDoubleConstant::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks that message expectations do not have a configured response.
#
# @example
@ -6845,12 +6826,7 @@ RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String)
# Checks for consistent verified double reference style.
#
# Only investigates references that are one of the supported styles.
#
# This cop can be configured in your configuration using the
# `EnforcedStyle` option and supports `--auto-gen-config`.
#
# @example `EnforcedStyle: constant` (default)
# @example
# # bad
# let(:foo) do
# instance_double('ClassName', method_name: 'returned_value')
@ -6860,17 +6836,7 @@ RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String)
# let(:foo) do
# instance_double(ClassName, method_name: 'returned_value')
# end
# @example `EnforcedStyle: string`
# # bad
# let(:foo) do
# instance_double(ClassName, method_name: 'returned_value')
# end
#
# # good
# let(:foo) do
# instance_double('ClassName', method_name: 'returned_value')
# end
# @example Reference is not in the supported style list. No enforcement
# @example Reference is any dynamic variable. No enforcement
#
# # good
# let(:foo) do
@ -6878,35 +6844,24 @@ RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String)
# end
# @see https://rspec.info/features/3-12/rspec-mocks/verifying-doubles
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#43
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#32
class RuboCop::Cop::RSpec::VerifiedDoubleReference < ::RuboCop::Cop::RSpec::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#74
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#66
def autocorrect(corrector, node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#58
def on_send(node); end
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#66
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#50
def verified_double(param0 = T.unsafe(nil)); end
private
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#101
def correct_style(offense); end
# @return [Boolean]
#
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#92
def opposing_style?(class_reference); end
end
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#47
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#35
RuboCop::Cop::RSpec::VerifiedDoubleReference::MSG = T.let(T.unsafe(nil), String)
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#60
RuboCop::Cop::RSpec::VerifiedDoubleReference::REFERENCE_TYPE_STYLES = T.let(T.unsafe(nil), Hash)
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#49
# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#38
RuboCop::Cop::RSpec::VerifiedDoubleReference::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
# Prefer using verifying doubles over normal doubles.

View File

@ -94,7 +94,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.70.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-md-1.2.4/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.23.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.3.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.4.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.8.7/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-lsp-0.23.6/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-macho-4.1.0/lib")