Sha256: ca2c5a67756f02975782fa97e5f4fa24a83097863ff31f62422330de911316e3

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

require 'spec_helper'

describe Etcd::Keys do

  let(:client) do
    Etcd.client
  end

  it '#set/#get' do
    key = random_key
    value = uuid.generate
    client.set(key, value)
    expect(client.get(key).value).to eq(value)
  end

  context '#exists?' do
    it 'should be true for existing keys' do
      key = random_key
      client.create(key, 10)
      expect(client.exists?(key)).to be_true
    end
    it 'should be true for existing keys' do
      expect(client.exists?(random_key)).to be_false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
etcd-0.2.0.alpha spec/etcd/keys_spec.rb