Sha256: 42ae62306ca801b632096f173c8a1b8988cf3f391426f0a9f02c06b155a52ff6

Contents?: true

Size: 442 Bytes

Versions: 33

Compression:

Stored size: 442 Bytes

Contents

require 'spec_helper'

describe '#hkeys(key)' do
  before do
    @key = 'mock-redis-test:hkeys'
    @redises.hset(@key, 'k1', 'v1')
    @redises.hset(@key, 'k2', 'v2')
  end

  it 'returns the keys stored in the hash' do
    @redises.hkeys(@key).sort.should == %w[k1 k2]
  end

  it 'returns [] when there is no such key' do
    @redises.hkeys('mock-redis-test:nonesuch').should == []
  end

  it_should_behave_like 'a hash-only command'
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
mock_redis-0.36.0 spec/commands/hkeys_spec.rb
mock_redis-0.35.0 spec/commands/hkeys_spec.rb
mock_redis-0.34.0 spec/commands/hkeys_spec.rb
mock_redis-0.33.0 spec/commands/hkeys_spec.rb
mock_redis-0.32.0 spec/commands/hkeys_spec.rb
mock_redis-0.31.0 spec/commands/hkeys_spec.rb
mock_redis-0.30.0 spec/commands/hkeys_spec.rb
mock_redis-0.29.0 spec/commands/hkeys_spec.rb
mock_redis-0.28.0 spec/commands/hkeys_spec.rb
mock_redis-0.27.3 spec/commands/hkeys_spec.rb
mock_redis-0.27.2 spec/commands/hkeys_spec.rb
mock_redis-0.27.1 spec/commands/hkeys_spec.rb
mock_redis-0.27.0 spec/commands/hkeys_spec.rb
mock_redis-0.26.0 spec/commands/hkeys_spec.rb
mock_redis-0.25.0 spec/commands/hkeys_spec.rb
mock_redis-0.24.0 spec/commands/hkeys_spec.rb
mock_redis-0.23.0 spec/commands/hkeys_spec.rb
mock_redis-0.22.0 spec/commands/hkeys_spec.rb
mock_redis-0.21.0 spec/commands/hkeys_spec.rb
mock_redis-0.20.0 spec/commands/hkeys_spec.rb