From b0e82b092531b2fb7def85e4e6350a2493097fcd Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Mon, 12 Mar 2018 10:23:32 -0700 Subject: [PATCH] Deprecate Capybara::Helpers::normalize_whitespace --- lib/capybara/helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/capybara/helpers.rb b/lib/capybara/helpers.rb index 91c54ad43..ae2f59531 100644 --- a/lib/capybara/helpers.rb +++ b/lib/capybara/helpers.rb @@ -6,16 +6,16 @@ module Helpers extend self ## - # + # @deprecated # Normalizes whitespace space by stripping leading and trailing # whitespace and replacing sequences of whitespace characters # with a single space. - # TODO: Deprecate this see: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-bot-dom-getvisibletext # # @param [String] text Text to normalize # @return [String] Normalized text # def normalize_whitespace(text) + warn "DEPRECATED: Capybara::Helpers::normalize_whitespace is deprecated, please update your driver" text.to_s.gsub(/[[:space:]]+/, ' ').strip end