Sha256: 97f15ce0ebf1fd1bd119c5cbca606c30641e42ff844cf066bc2905d0845bafbf

Contents?: true

Size: 360 Bytes

Versions: 13

Compression:

Stored size: 360 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
end

Version data entries

13 entries across 13 versions & 1 rubygems

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