Sha256: 3ba332f7c250372572693e3429effa91788ed60b8cbdad1077a97b484cb7f9ff

Contents?: true

Size: 468 Bytes

Versions: 4

Compression:

Stored size: 468 Bytes

Contents

shared_examples_for 'a list-only command' do
  it 'raises an error for non-list values' do |example|
    key = 'mock-redis-test:list-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(defined?(default_error) ? default_error : RuntimeError)
  end

  it_should_behave_like 'does not remove empty strings on error'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mock_redis-0.36.0 spec/support/shared_examples/only_operates_on_lists.rb
mock_redis-0.35.0 spec/support/shared_examples/only_operates_on_lists.rb
mock_redis-0.34.0 spec/support/shared_examples/only_operates_on_lists.rb
mock_redis-0.33.0 spec/support/shared_examples/only_operates_on_lists.rb