Sha256: 0aa0a8fa06413a326d7dc5361c42d28af0687b474d31068ecf4362a94b3a8012

Contents?: true

Size: 639 Bytes

Versions: 1

Compression:

Stored size: 639 Bytes

Contents

require 'spec_helper'

describe Etcd::Node do

  let(:client) do
    Etcd.client
  end

  it "should create a directory with parent key when nested keys are set" do
    parent = random_key
    child = random_key
    value = uuid.generate
    client.set(parent+child, value)
    expect(client.get(parent+child)).to_not be_directory
    expect(client.get(parent)).to be_directory
  end

  context '#children' do
    it 'should raise exception when invoked against a leaf node' do
      parent = random_key
      client.create(random_key, 10)
      expect do
        client.get(random_key).children
      end.to raise_error
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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