Sha256: 5cd979cf793aaca02b74e40fce3af2695dcb25ead7f21d44c2e4b4656cbfb160

Contents?: true

Size: 1021 Bytes

Versions: 7

Compression:

Stored size: 1021 Bytes

Contents

require_relative '../../spec_helper'


module Eurydice
  module Pelops
    describe Cluster do
      it 'can connect' do
        @cluster = Eurydice.connect
        @cluster.should be_connected
      end
  
      describe '#keyspace' do
        before do
          @cluster = Eurydice.connect
          @keyspace_name = "eurydice_test_space_#{rand(1000)}"
          if @cluster.keyspaces.include?(@keyspace_name)
            @cluster.keyspace(@keyspace_name).drop!
          end
        end
        
        after do
          @keyspace.drop! rescue nil
        end
    
        it 'creates a keyspace' do
          @keyspace = @cluster.keyspace(@keyspace_name)
          @keyspace.exists?.should be_true
        end
  
        it 'defers the creation of a keyspace with :create => false' do
          @keyspace = @cluster.keyspace(@keyspace_name, :create => false)
          @keyspace.exists?.should be_false
          @keyspace.create!
          @keyspace.exists?.should be_true
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
eurydice-1.1.0.b4-java spec/eurydice/pelops/cluster_spec.rb
eurydice-1.1.0.b3-java spec/eurydice/pelops/cluster_spec.rb
eurydice-1.1.0.b2-java spec/eurydice/pelops/cluster_spec.rb
eurydice-1.0.3-java spec/eurydice/pelops/cluster_spec.rb
eurydice-1.0.2-java spec/eurydice/pelops/cluster_spec.rb
eurydice-1.0.1-java spec/eurydice/pelops/cluster_spec.rb
eurydice-1.0.0-java spec/eurydice/pelops/cluster_spec.rb