Sha256: 478351fd9dcdeb2d4b534865016ea2a454afd238c9b8f3bf43e29c1b5dc4e742

Contents?: true

Size: 488 Bytes

Versions: 14

Compression:

Stored size: 488 Bytes

Contents

require 'spec_helper'

describe '#mapped_mset(hash)' do
  before do
    @key1 = 'mock-redis-test:a'
    @key2 = 'mock-redis-test:b'
    @key3 = 'mock-redis-test:c'

    @redises.set(@key1, '1')
    @redises.set(@key2, '2')
  end

  it 'sets the values properly' do
    @redises.mapped_mset({@key1 => 'one', @key3 => 'three'}).should eq('OK')
    @redises.get(@key1).should eq('one')
    @redises.get(@key2).should eq('2') # left alone
    @redises.get(@key3).should eq('three')
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mock_redis-0.14.1 spec/commands/mapped_mset_spec.rb
mock_redis-0.14.0 spec/commands/mapped_mset_spec.rb
mock_redis-0.13.2 spec/commands/mapped_mset_spec.rb
mock_redis-0.13.1 spec/commands/mapped_mset_spec.rb
mock_redis-0.13.0 spec/commands/mapped_mset_spec.rb
mock_redis-0.12.1 spec/commands/mapped_mset_spec.rb
mock_redis-0.12.0 spec/commands/mapped_mset_spec.rb
mock_redis-0.11.0 spec/commands/mapped_mset_spec.rb
mock_redis-0.10.0 spec/commands/mapped_mset_spec.rb
mock_redis-0.9.0 spec/commands/mapped_mset_spec.rb
mock_redis-0.8.2 spec/commands/mapped_mset_spec.rb
mock_redis-0.8.1 spec/commands/mapped_mset_spec.rb
mock_redis-0.8.0 spec/commands/mapped_mset_spec.rb
mock_redis-0.7.0 spec/commands/mapped_mset_spec.rb