diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9e42ff6191..d4130a9d2d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -181,6 +181,16 @@ RSpec.configure do |config| 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