class Capybara::Queries::BaseQuery

def count_message

def count_message
  message = +''
  count, between, maximum, minimum = options.values_at(:count, :between, :maximum, :minimum)
  if count
    message << " #{count} #{Capybara::Helpers.declension('time', 'times', count)}"
  elsif between
    message << " between #{between.first} and #{between.last} times"
  elsif maximum
    message << " at most #{maximum} #{Capybara::Helpers.declension('time', 'times', maximum)}"
  elsif minimum
    message << " at least #{minimum} #{Capybara::Helpers.declension('time', 'times', minimum)}"
  end
  message
end