Line length cleanup

This commit is contained in:
Thomas Walpole 2018-11-12 10:34:15 -08:00
parent db683a616b
commit e25a293f37
4 changed files with 16 additions and 7 deletions

View File

@ -17,8 +17,9 @@ Metrics/LineLength:
- 'lib/capybara/spec/**/*'
- 'lib/capybara/selector.rb'
IgnoredPatterns:
- '\s*# '
- '\s*(raise|warn) '
- '\s+# rubocop'
- '^\s*#'
- '^\s*(raise|warn) '
Max: 120
Metrics/BlockLength:

View File

@ -17,7 +17,9 @@ module Capybara
# @return [true]
#
def assert_title(title, **options)
_verify_title(title, options) { |query| raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self) }
_verify_title(title, options) do |query|
raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self)
end
end
##
@ -28,7 +30,9 @@ module Capybara
# @return [true]
#
def assert_no_title(title, **options)
_verify_title(title, options) { |query| raise Capybara::ExpectationNotMet, query.negative_failure_message if query.resolves_for?(self) }
_verify_title(title, options) do |query|
raise Capybara::ExpectationNotMet, query.negative_failure_message if query.resolves_for?(self)
end
end
##

View File

@ -225,7 +225,7 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
::Selenium::WebDriver::Error::StaleElementReferenceError,
::Selenium::WebDriver::Error::UnhandledError,
::Selenium::WebDriver::Error::ElementNotVisibleError,
::Selenium::WebDriver::Error::InvalidSelectorError, # Work around a race condition that can occur with chromedriver and #go_back/#go_forward
::Selenium::WebDriver::Error::InvalidSelectorError, # Work around a chromedriver go_back/go_forward race condition
::Selenium::WebDriver::Error::ElementNotInteractableError,
::Selenium::WebDriver::Error::ElementClickInterceptedError,
::Selenium::WebDriver::Error::InvalidElementStateError,

View File

@ -20,7 +20,9 @@ module Capybara
# @return [true]
#
def assert_current_path(path, **options)
_verify_current_path(path, options) { |query| raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self) }
_verify_current_path(path, options) do |query|
raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self)
end
end
##
@ -34,7 +36,9 @@ module Capybara
# @return [true]
#
def assert_no_current_path(path, **options)
_verify_current_path(path, options) { |query| raise Capybara::ExpectationNotMet, query.negative_failure_message if query.resolves_for?(self) }
_verify_current_path(path, options) do |query|
raise Capybara::ExpectationNotMet, query.negative_failure_message if query.resolves_for?(self)
end
end
##