Skip to content

Commit

Permalink
Deprecate Capybara::Helpers::normalize_whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Mar 12, 2018
1 parent 129759b commit b0e82b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/capybara/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b0e82b0

Please sign in to comment.