Sha256: 59f3ec041851b36ff738e38e00018162c60c9110412e14b3af8b31448956e94a

Contents?: true

Size: 426 Bytes

Versions: 20

Compression:

Stored size: 426 Bytes

Contents

shared_examples_for 'a hash-only command' do
  it 'raises an error for non-hash values' do |example|
    key = 'mock-redis-test:hash-only'

    method = method_from_description(example)
    args = args_for_method(method).unshift(key)

    @redises.set(key, 1)
    lambda do
      @redises.send(method, *args)
    end.should raise_error(RuntimeError)
  end

  it_should_behave_like 'does not remove empty strings on error'
end

Version data entries

20 entries across 20 versions & 1 rubygems

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