Sha256: 253355af4342e06c8be17e30b23a359970a71a64690c6df844d16d938c6f383c

Contents?: true

Size: 793 Bytes

Versions: 21

Compression:

Stored size: 793 Bytes

Contents

module Neuron
  module Client
    describe MembaseConnection do
      describe "initialize(servers)" do
        it "should properly set @membase" do
          c = stub(:client)
          Dalli::Client.should_receive(:new).with('127.0.0.1:11211').and_return(c)

          m = MembaseConnection.new('127.0.0.1:11211')

          m.instance_variable_get(:@client).should == c
        end
      end

      describe "get(key)" do
        it "should call the expected method and return the expected value" do
          c = stub(:client)
          Dalli::Client.should_receive(:new).with('127.0.0.1:11211').and_return(c)
          m = MembaseConnection.new('127.0.0.1:11211')
          c.should_receive(:get).with('key_value')

          m.get('key_value', 42)
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neuron-client-0.6.0 spec/lib/membase_connection_spec.rb
neuron-client-0.5.3 spec/lib/membase_connection_spec.rb
neuron-client-0.5.2 spec/lib/membase_connection_spec.rb
neuron-client-0.5.1 spec/lib/membase_connection_spec.rb
neuron-client-0.5.0 spec/lib/membase_connection_spec.rb
neuron-client-0.4.8 spec/lib/membase_connection_spec.rb
neuron-client-0.4.7 spec/lib/membase_connection_spec.rb
neuron-client-0.4.6 spec/lib/membase_connection_spec.rb
neuron-client-0.4.5 spec/lib/membase_connection_spec.rb
neuron-client-0.4.4 spec/lib/membase_connection_spec.rb
neuron-client-0.4.3 spec/lib/membase_connection_spec.rb
neuron-client-0.4.2 spec/lib/membase_connection_spec.rb
neuron-client-0.4.1 spec/lib/membase_connection_spec.rb
neuron-client-0.4.0 spec/lib/membase_connection_spec.rb
neuron-client-0.3.0 spec/lib/membase_connection_spec.rb
neuron-client-0.2.6 spec/lib/membase_connection_spec.rb
neuron-client-0.2.5 spec/lib/membase_connection_spec.rb
neuron-client-0.2.4 spec/lib/membase_connection_spec.rb
neuron-client-0.2.3 spec/lib/membase_connection_spec.rb
neuron-client-0.2.2 spec/lib/membase_connection_spec.rb