Sha256: 5c803a1b248f51fbdf7c2ae84208bbe7daed1d17b0d82e8b80184ff6b8fa55a7

Contents?: true

Size: 710 Bytes

Versions: 14

Compression:

Stored size: 710 Bytes

Contents

shared_examples_for 'node set' do
  let(:node_set){ Cellect::NodeSet.new }
  
  it 'should connect to zoo keeper' do
    node_set.zk.should be_nil
    pass_until node_set, is: :ready
    node_set.zk.should be_connected
  end
  
  it 'should know the connection state' do
    node_set.state.should be :initializing
    pass_until node_set, is: :ready
    node_set.should be_ready
  end
  
  it 'should accept a connection string' do
    begin
      pass_until node_set, is: :ready
      ENV['ZK_URL'] = 'foobar'
      node_set.send(:zk_url).should == 'foobar'
      ENV.delete 'ZK_URL'
      node_set.send(:zk_url).should == 'localhost:2181'
    ensure
      ENV['ZK_URL'] = 'localhost:21811'
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
cellect-client-0.0.7 spec/support/shared_examples_for_node_set.rb
cellect-server-0.0.7 spec/support/shared_examples_for_node_set.rb
cellect-client-0.0.6 spec/support/shared_examples_for_node_set.rb
cellect-server-0.0.6 spec/support/shared_examples_for_node_set.rb
cellect-client-0.0.5 spec/support/shared_examples_for_node_set.rb
cellect-server-0.0.5 spec/support/shared_examples_for_node_set.rb
cellect-client-0.0.4 spec/support/shared_examples_for_node_set.rb
cellect-server-0.0.4 spec/support/shared_examples_for_node_set.rb
cellect-client-0.0.3 spec/support/shared_examples_for_node_set.rb
cellect-server-0.0.3 spec/support/shared_examples_for_node_set.rb
cellect-client-0.0.2 spec/support/shared_examples_for_node_set.rb
cellect-server-0.0.2 spec/support/shared_examples_for_node_set.rb
cellect-client-0.0.1 spec/support/shared_examples_for_node_set.rb
cellect-server-0.0.1 spec/support/shared_examples_for_node_set.rb