Sha256: a65b11f516c58e39f56d0d920bc5028da1ed3775a401df169eb2a48f8d98a641

Contents?: true

Size: 448 Bytes

Versions: 31

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

31 entries across 31 versions & 2 rubygems

Version Path
mock_redis-0.14.1 spec/commands/hash_operator_spec.rb
mock_redis-0.14.0 spec/commands/hash_operator_spec.rb
mock_redis-0.13.2 spec/commands/hash_operator_spec.rb
mock_redis-0.13.1 spec/commands/hash_operator_spec.rb
mock_redis-0.13.0 spec/commands/hash_operator_spec.rb
mock_redis-0.12.1 spec/commands/hash_operator_spec.rb
mock_redis-0.12.0 spec/commands/hash_operator_spec.rb
mock_redis-0.11.0 spec/commands/hash_operator_spec.rb
mock_redis-0.10.0 spec/commands/hash_operator_spec.rb
mock_redis-0.9.0 spec/commands/hash_operator_spec.rb
mock_redis-0.8.2 spec/commands/hash_operator_spec.rb
mock_redis-0.8.1 spec/commands/hash_operator_spec.rb
mock_redis-0.8.0 spec/commands/hash_operator_spec.rb
mock_redis-0.7.0 spec/commands/hash_operator_spec.rb
mock_redis-0.6.6 spec/commands/hash_operator_spec.rb
mock_redis-0.6.5 spec/commands/hash_operator_spec.rb
mock_redis-0.6.4 spec/commands/hash_operator_spec.rb
mock_redis-0.6.3 spec/commands/hash_operator_spec.rb
mock_redis-0.6.2 spec/commands/hash_operator_spec.rb
mock_redis-0.6.1 spec/commands/hash_operator_spec.rb