Only warn about #default_wait_time deprecation once
This commit is contained in:
parent
2be3cbb19a
commit
e5c5991bd3
|
@ -298,7 +298,7 @@ module Capybara
|
|||
|
||||
# @deprecated Use default_max_wait_time instead
|
||||
def default_wait_time
|
||||
deprecate('default_wait_time', 'default_max_wait_time')
|
||||
deprecate('default_wait_time', 'default_max_wait_time', true)
|
||||
default_max_wait_time
|
||||
end
|
||||
|
||||
|
@ -313,8 +313,10 @@ module Capybara
|
|||
warn "`include Capybara` is deprecated. Please use `include Capybara::DSL` instead."
|
||||
end
|
||||
|
||||
def deprecate(method, alternate_method)
|
||||
warn "DEPRECATED: ##{method} is deprecated, please use ##{alternate_method} instead"
|
||||
def deprecate(method, alternate_method, once=false)
|
||||
@deprecation_notified ||= {}
|
||||
warn "DEPRECATED: ##{method} is deprecated, please use ##{alternate_method} instead" unless once and @deprecation_notified[method]
|
||||
@deprecation_notified[method]=true
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue