Merge pull request #13921 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.13.2
build(deps): bump rubocop-rspec from 2.13.1 to 2.13.2 in /Library/Homebrew
This commit is contained in:
commit
d5b6b068c1
@ -143,7 +143,7 @@ GEM
|
|||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.33.0, < 2.0)
|
||||||
rubocop-rspec (2.13.1)
|
rubocop-rspec (2.13.2)
|
||||||
rubocop (~> 1.33)
|
rubocop (~> 1.33)
|
||||||
rubocop-sorbet (0.6.11)
|
rubocop-sorbet (0.6.11)
|
||||||
rubocop (>= 0.90.0)
|
rubocop (>= 0.90.0)
|
||||||
|
@ -182,6 +182,7 @@ class RuboCop::Cop::RSpec::Capybara::SpecificFinders < ::RuboCop::Cop::RSpec::Ba
|
|||||||
private
|
private
|
||||||
|
|
||||||
def attribute?(arg); end
|
def attribute?(arg); end
|
||||||
|
def end_pos(node); end
|
||||||
def offense_range(node); end
|
def offense_range(node); end
|
||||||
def on_attr(node, arg); end
|
def on_attr(node, arg); end
|
||||||
def on_id(node, arg); end
|
def on_id(node, arg); end
|
||||||
@ -1235,6 +1236,7 @@ RuboCop::Cop::RSpec::NestedGroups::MSG = T.let(T.unsafe(nil), String)
|
|||||||
|
|
||||||
class RuboCop::Cop::RSpec::NoExpectationExample < ::RuboCop::Cop::RSpec::Base
|
class RuboCop::Cop::RSpec::NoExpectationExample < ::RuboCop::Cop::RSpec::Base
|
||||||
def including_any_expectation?(param0); end
|
def including_any_expectation?(param0); end
|
||||||
|
def including_any_skip_example?(param0); end
|
||||||
def on_block(node); end
|
def on_block(node); end
|
||||||
def on_numblock(node); end
|
def on_numblock(node); end
|
||||||
def regular_or_focused_example?(param0 = T.unsafe(nil)); end
|
def regular_or_focused_example?(param0 = T.unsafe(nil)); end
|
@ -4936,6 +4936,7 @@ module RuboCop::AST::NodePattern::Sets
|
|||||||
SET_KEYS_VALUES_TO_H_TO_XML = ::T.let(nil, ::T.untyped)
|
SET_KEYS_VALUES_TO_H_TO_XML = ::T.let(nil, ::T.untyped)
|
||||||
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
|
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
|
||||||
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
|
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
|
||||||
|
SET_PENDING_SKIP = ::T.let(nil, ::T.untyped)
|
||||||
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
|
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
|
||||||
SET_TIME_DATETIME = ::T.let(nil, ::T.untyped)
|
SET_TIME_DATETIME = ::T.let(nil, ::T.untyped)
|
||||||
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
|
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
|
||||||
|
@ -89,7 +89,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width
|
|||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.35.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.35.1/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.15.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.15.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.16.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.16.1/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.13.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.13.2/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.11/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.11/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-3.0.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-3.0.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"
|
||||||
|
@ -76,8 +76,15 @@ module RuboCop
|
|||||||
end
|
end
|
||||||
|
|
||||||
def offense_range(node)
|
def offense_range(node)
|
||||||
range_between(node.loc.selector.begin_pos,
|
range_between(node.loc.selector.begin_pos, end_pos(node))
|
||||||
node.loc.end.end_pos)
|
end
|
||||||
|
|
||||||
|
def end_pos(node)
|
||||||
|
if node.loc.end
|
||||||
|
node.loc.end.end_pos
|
||||||
|
else
|
||||||
|
node.loc.expression.end_pos
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -29,20 +29,20 @@ module RuboCop
|
|||||||
class VisibilityMatcher < Base
|
class VisibilityMatcher < Base
|
||||||
MSG_FALSE = 'Use `:all` or `:hidden` instead of `false`.'
|
MSG_FALSE = 'Use `:all` or `:hidden` instead of `false`.'
|
||||||
MSG_TRUE = 'Use `:visible` instead of `true`.'
|
MSG_TRUE = 'Use `:visible` instead of `true`.'
|
||||||
CAPYBARA_MATCHER_METHODS = %i[
|
CAPYBARA_MATCHER_METHODS = %w[
|
||||||
have_selector
|
button
|
||||||
have_css
|
checked_field
|
||||||
have_xpath
|
css
|
||||||
have_link
|
field
|
||||||
have_button
|
link
|
||||||
have_field
|
select
|
||||||
have_select
|
selector
|
||||||
have_table
|
table
|
||||||
have_checked_field
|
unchecked_field
|
||||||
have_unchecked_field
|
xpath
|
||||||
have_text
|
].flat_map do |element|
|
||||||
have_content
|
["have_#{element}".to_sym, "have_no_#{element}".to_sym]
|
||||||
].freeze
|
end
|
||||||
|
|
||||||
RESTRICT_ON_SEND = CAPYBARA_MATCHER_METHODS
|
RESTRICT_ON_SEND = CAPYBARA_MATCHER_METHODS
|
||||||
|
|
@ -49,10 +49,18 @@ module RuboCop
|
|||||||
send_pattern('#Expectations.all')
|
send_pattern('#Expectations.all')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# @!method including_any_skip_example?(node)
|
||||||
|
# @param [RuboCop::AST::Node] node
|
||||||
|
# @return [Boolean]
|
||||||
|
def_node_search :including_any_skip_example?, <<~PATTERN
|
||||||
|
(send nil? {:pending :skip} ...)
|
||||||
|
PATTERN
|
||||||
|
|
||||||
# @param [RuboCop::AST::BlockNode] node
|
# @param [RuboCop::AST::BlockNode] node
|
||||||
def on_block(node)
|
def on_block(node)
|
||||||
return unless regular_or_focused_example?(node)
|
return unless regular_or_focused_example?(node)
|
||||||
return if including_any_expectation?(node)
|
return if including_any_expectation?(node)
|
||||||
|
return if including_any_skip_example?(node)
|
||||||
|
|
||||||
add_offense(node)
|
add_offense(node)
|
||||||
end
|
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user