Sha256: a00c52f115f3af6a1ddc50fe1307bbf89a2801d867c9aaaf55453d26b9566cfc

Contents?: true

Size: 470 Bytes

Versions: 17

Compression:

Stored size: 470 Bytes

Contents

require 'spec_helper'

describe '#dump(key)' do
  before do
    @key = 'mock-redis-test:45794'
    # These are mock-only, since our dump/restore implementations
    # aren't compatible with real redis.
    @mock = @redises.mock
  end

  it 'returns nil for keys that do not exist' do
    @mock.dump(@key).should be_nil
  end

  it 'returns a serialized value for keys that do exist' do
    @mock.set(@key, '2')
    @mock.dump(@key).should == Marshal.dump('2')
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

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