summaryrefslogtreecommitdiff
path: root/spec/support/helpers/redis_without_keys.rb
blob: ff64a3cf08e583ee15bff739e85257796e43e69b (plain)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

class Redis
  ForbiddenCommand = Class.new(StandardError)

  def keys(*args)
    raise ForbiddenCommand, "Don't use `Redis#keys` as it iterates over all "\
                               "keys in redis. Use `Redis#scan_each` instead."
  end
end