module MockRedis::Assertions
Private Instance Methods
Source
# File lib/mock_redis/assertions.rb, line 10 def assert_has_args(args, command) if args.empty? raise Error.command_error( "ERR wrong number of arguments for '#{command}' command", self ) end end
Source
# File lib/mock_redis/assertions.rb, line 19 def assert_type(*args) args.each do |arg| DUMP_TYPES.fetch(arg.class) do |unexpected_class| unless DUMP_TYPES.keys.find { |t| t > unexpected_class } raise TypeError, "Unsupported command argument type: #{unexpected_class}" end end end end