Sha256: a28b9456c48b322802bcc918fd77fe3c8ec247ba8b642c9abc7304b72e1eba6b

Contents?: true

Size: 448 Bytes

Versions: 13

Compression:

Stored size: 448 Bytes

Contents

require 'spec_helper'

describe '#[](key)' do
  before do
    @key = 'mock-redis-test:hash_operator'
  end

  it 'returns nil for a nonexistent value' do
    @redises['mock-redis-test:does-not-exist'].should be_nil
  end

  it 'returns a stored string value' do
    @redises[@key] = 'forsooth'
    @redises[@key].should == 'forsooth'
  end

  it 'treats integers as strings' do
    @redises[@key] = 100
    @redises[@key].should == '100'
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mock_redis-0.19.0 spec/commands/hash_operator_spec.rb
mock_redis-0.18.0 spec/commands/hash_operator_spec.rb
mock_redis-0.17.3 spec/commands/hash_operator_spec.rb
mock_redis-0.17.2 spec/commands/hash_operator_spec.rb
mock_redis-0.17.1 spec/commands/hash_operator_spec.rb
mock_redis-0.17.0 spec/commands/hash_operator_spec.rb
mock_redis-0.16.1 spec/commands/hash_operator_spec.rb
mock_redis-0.16.0 spec/commands/hash_operator_spec.rb
mock_redis-0.15.4 spec/commands/hash_operator_spec.rb
mock_redis-0.15.3 spec/commands/hash_operator_spec.rb
mock_redis-0.15.2 spec/commands/hash_operator_spec.rb
mock_redis-0.15.1 spec/commands/hash_operator_spec.rb
mock_redis-0.15.0 spec/commands/hash_operator_spec.rb