class Capybara::Queries::BaseQuery

def self.wait(options, default = Capybara.default_max_wait_time)

def self.wait(options, default = Capybara.default_max_wait_time)
  # if no value or nil for the :wait option is passed it should default to the default
  wait = options.fetch(:wait, nil)
  wait = default if wait.nil?
  wait || 0
end