diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-04-13 10:50:01 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-04-13 10:50:01 -0500 |
commit | 9cf9cc8ee729c1066d3670159931c5a5ce1ddc93 (patch) | |
tree | 2f2ed695574965f63e6751d402a25018b06a1760 /spec/support/capybara.rb | |
parent | 960e2065f923e14e40651686eb9aafa38e5d748b (diff) | |
download | gitlab-ce-9cf9cc8ee729c1066d3670159931c5a5ce1ddc93.tar.gz |
prefer &. to .try
Diffstat (limited to 'spec/support/capybara.rb')
-rw-r--r-- | spec/support/capybara.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index e0fb4b83229..9ddcc5f2fbf 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -84,7 +84,7 @@ RSpec.configure do |config| config.after(:example, :js) do |example| # when a test fails, display any messages in the browser's console if example.exception - console = page.driver.browser.manage.logs.get(:browser).try(:reject) { |log| log.message =~ JS_CONSOLE_FILTER } + console = page.driver.browser.manage.logs.get(:browser)&.reject { |log| log.message =~ JS_CONSOLE_FILTER } if console.present? message = "Unexpected browser console output:\n" + console.map(&:message).join("\n") raise JSConsoleError, message |