require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'rid/database' describe "Database" do before do @name = "http://127.0.0.1:5984/rid-tests" @db = Rid::Database.new(@name) end after do RestClient.delete(@name) rescue nil end describe "initialization" do it "should initialize database by name" do @db.name.should == @name end end describe "get" do it "should return nil if document was not found" do @db.get(Rid::Document.new).should be_nil end end end