1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Update to rubocop 0.93

This commit is contained in:
Thomas Walpole 2020-10-10 13:18:39 -07:00
parent f43b6499ec
commit ac9aa627cc
4 changed files with 17 additions and 14 deletions

View file

@ -62,6 +62,9 @@ Lint/UnusedMethodArgument:
- 'lib/capybara/driver/base.rb'
- 'lib/capybara/driver/node.rb'
Lint/RedundantSafeNavigation:
Enabled: false
Lint/RaiseException:
Enabled: true
@ -156,10 +159,10 @@ Style/RedundantFetchBlock:
Style/AccessorGrouping:
Enabled: false
Style/BisectedAttrAccessor:
Enabled: false
Style/RedundantAssignment:
Enabled: true
@ -177,7 +180,7 @@ Style/HashLikeCase:
Style/RedundantFileExtensionInRequire:
Enabled: true
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
@ -206,28 +209,28 @@ Security/YAMLLoad:
Performance/AncestorsInclude:
Enabled: true
Performance/BigDecimalWithNumericArgument:
Enabled: true
Performance/RedundantSortBlock:
Enabled: true
Performance/RedundantStringChars:
Enabled: true
Performance/ReverseFirst:
Enabled: true
Performance/SortReverse:
Enabled: true
Performance/Squeeze:
Enabled: true
Performance/StringInclude:
Enabled: true
RSpec/ExampleWording:

View file

@ -32,7 +32,7 @@ class Capybara::RackTest::Browser
def submit(method, path, attributes)
path = request_path if path.nil? || path.empty?
uri = build_uri(path)
uri.query = '' if method&.to_s&.downcase == 'get'
uri.query = '' if method.to_s.downcase == 'get'
process_and_follow_redirects(method, uri.to_s, attributes, 'HTTP_REFERER' => current_url)
end

View file

@ -215,7 +215,7 @@ module Capybara
end
def default_visibility(fallback = Capybara.ignore_hidden_elements, options = {})
vis = if @default_visibility&.respond_to?(:call)
vis = if @default_visibility.respond_to?(:call)
@default_visibility.call(options)
else
@default_visibility

View file

@ -53,7 +53,7 @@ Capybara.add_selector(:label, locator_type: [String, Symbol]) do
end
end
describe_node_filters do |**options|
" for element #{options[:for]}" if options[:for]&.is_a?(Capybara::Node::Element)
" for element #{options[:for]}" if options[:for].is_a?(Capybara::Node::Element)
end
def labelable_elements