Sha256: 1f40b8ce45b533cfccb6a4b6db5783ff7191c0b44f4a14a10a433ede19c23f3f

Contents?: true

Size: 1.03 KB

Versions: 21

Compression:

Stored size: 1.03 KB

Contents

require File.expand_path("../../../spec_helper", __FILE__)

describe CouchRest::Server do
  
  describe "available databases" do
    before(:each) do
      @couch = CouchRest::Server.new
    end

    after(:each) do
      @couch.available_databases.each do |ref, db|
        db.delete!
      end
    end
    
    it "should let you add more databases" do
      @couch.available_databases.should be_empty
      @couch.define_available_database(:default, "cr-server-test-db")
      @couch.available_databases.keys.should include(:default)
    end
    
    it "should verify that a database is available" do
      @couch.define_available_database(:default, "cr-server-test-db")
      @couch.available_database?(:default).should be_true
      @couch.available_database?("cr-server-test-db").should be_true
      @couch.available_database?(:matt).should be_false
    end
    
    it "should let you set a default database" do
      @couch.default_database = 'cr-server-test-default-db'
      @couch.available_database?(:default).should be_true
    end
  end
  
end

Version data entries

21 entries across 21 versions & 7 rubygems

Version Path
mattetti-couchrest-0.33 spec/couchrest/core/server_spec.rb
mattetti-couchrest-0.34 spec/couchrest/core/server_spec.rb
norr-couchrest-0.33.01 spec/couchrest/core/server_spec.rb
norr-couchrest-0.33.02 spec/couchrest/core/server_spec.rb
norr-couchrest-0.33.06 spec/couchrest/core/server_spec.rb
norr-couchrest-0.33.07 spec/couchrest/core/server_spec.rb
peterpunk-couchrest-0.33 spec/couchrest/core/server_spec.rb
peterpunk-couchrest-0.34.1 spec/couchrest/core/server_spec.rb
sporkd-couchrest-0.33 spec/couchrest/core/server_spec.rb
sporkd-couchrest-0.34 spec/couchrest/core/server_spec.rb
will-couchrest-0.33.1 spec/couchrest/core/server_spec.rb
will-couchrest-0.33 spec/couchrest/core/server_spec.rb
couchrest-0.38 spec/couchrest/core/server_spec.rb
samlown-couchrest-0.37.2 spec/couchrest/core/server_spec.rb
samlown-couchrest-0.37.1 spec/couchrest/core/server_spec.rb
samlown-couchrest-0.35 spec/couchrest/core/server_spec.rb
couchrest-0.37 spec/couchrest/core/server_spec.rb
couchrest-0.36 spec/couchrest/core/server_spec.rb
couchrest-0.35 spec/couchrest/core/server_spec.rb
couchrest-0.34 spec/couchrest/core/server_spec.rb