Skip to content

Commit

Permalink
Merge pull request #5889 from Matt-Yorkley/suppress-selenium-warings
Browse files Browse the repository at this point in the history
Suppress Selenium warnings in test log output.
  • Loading branch information
mkllnk authored Aug 12, 2020
2 parents 70e2fb7 + 0edeb82 commit a820712
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ def restart_driver

config.include JsonSpec::Helpers

# Suppress Selenium deprecation warnings. Stops a flood of pointless warnings filling the
# test output. We can remove this in the future after upgrading Rails, Rack, and Capybara.
if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 0
Selenium::WebDriver.logger.level = :error
else
ActiveSupport::Deprecation.warn(
"Suppressing Selenium deprecation warnings is not needed any more."
)
end

# Profiling
#
# This code shouldn't be run in normal circumstances. But if you want to know
Expand Down

0 comments on commit a820712

Please sign in to comment.