Sha256: 7588729c45c30cbbf9de1f29d18df9aed14411d630704b17291359f5ceece2c4

Contents?: true

Size: 495 Bytes

Versions: 1

Compression:

Stored size: 495 Bytes

Contents

require 'spec_helper'

describe Sinatra::MemcachedCommand do
  let(:host) { ENV['MEMCACHED_1_PORT_11211_TCP_ADDR'] || 'localhost' }
  let(:port) { '11211' }
  let(:memcached_connection) { Dalli::Client.new("#{host}:#{port}") }
  let(:klass) { Class.new.extend(Sinatra::MemcachedCommand) }

  it 'runs a command in memcached' do
    memcached_connection.set('hello', 'world')
    expect(klass.memcached_command(host: host, port: port, command: 'get hello')[:response]).to match /world/
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
memcached-manager-1.0.0 spec/lib/extensions/memcached_command_spec.rb