Skip to content

Commit

Permalink
Merge pull request #13921 from Homebrew/dependabot/bundler/Library/Ho…
Browse files Browse the repository at this point in the history
…mebrew/rubocop-rspec-2.13.2

build(deps): bump rubocop-rspec from 2.13.1 to 2.13.2 in /Library/Homebrew
  • Loading branch information
MikeMcQuaid committed Sep 26, 2022
2 parents 4441452 + d23d224 commit d5b6b06
Show file tree
Hide file tree
Showing 134 changed files with 37 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.13.1)
rubocop-rspec (2.13.2)
rubocop (~> 1.33)
rubocop-sorbet (0.6.11)
rubocop (>= 0.90.0)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -4936,6 +4936,7 @@ module RuboCop::AST::NodePattern::Sets
SET_KEYS_VALUES_TO_H_TO_XML = ::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_PENDING_SKIP = ::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_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
$:.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-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/ruby-macho-3.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ def to_options(attrs)
end

def offense_range(node)
range_between(node.loc.selector.begin_pos,
node.loc.end.end_pos)
range_between(node.loc.selector.begin_pos, end_pos(node))
end

def end_pos(node)
if node.loc.end
node.loc.end.end_pos
else
node.loc.expression.end_pos
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ module Capybara
class VisibilityMatcher < Base
MSG_FALSE = 'Use `:all` or `:hidden` instead of `false`.'
MSG_TRUE = 'Use `:visible` instead of `true`.'
CAPYBARA_MATCHER_METHODS = %i[
have_selector
have_css
have_xpath
have_link
have_button
have_field
have_select
have_table
have_checked_field
have_unchecked_field
have_text
have_content
].freeze
CAPYBARA_MATCHER_METHODS = %w[
button
checked_field
css
field
link
select
selector
table
unchecked_field
xpath
].flat_map do |element|
["have_#{element}".to_sym, "have_no_#{element}".to_sym]
end

RESTRICT_ON_SEND = CAPYBARA_MATCHER_METHODS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,18 @@ class NoExpectationExample < Base
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
def on_block(node)
return unless regular_or_focused_example?(node)
return if including_any_expectation?(node)
return if including_any_skip_example?(node)

add_offense(node)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
module RSpec
# Version information for the RSpec RuboCop plugin.
module Version
STRING = '2.13.1'
STRING = '2.13.2'
end
end
end

0 comments on commit d5b6b06

Please sign in to comment.