first check in with one or two specs

This commit is contained in:
Chris Anderson 2008-03-17 23:07:57 -07:00
commit 2c42cf1ca5
2 changed files with 52 additions and 0 deletions

13
lib/couchrest.rb Normal file
View file

@ -0,0 +1,13 @@
require 'uri'
class Couchrest
def initialize server
@server = URI.parse server
end
def databases
end
end

39
spec/couchrest_spec.rb Normal file
View file

@ -0,0 +1,39 @@
require File.dirname(__FILE__) + '/../lib/couchrest'
describe Couchrest do
before(:each) do
@cr = Couchrest.new("http://local.grabb.it:5984")
end
describe "getting status" do
it "should list databases" do
@cr.databases.should be_an Array
end
end
describe "successfully creating a database" do
it "should start without a database" do
end
it "should PUT the database" do
end
it "should return the created databse" do
end
end
describe "failing to create a database because the name is taken" do
it "should start without a database" do
end
it "should PUT the database and raise an error" do
end
it "should not result in another database" do
end
end
end