commit 2c42cf1ca50da71bb10c35fb74574bebe7bbffad Author: Chris Anderson Date: Mon Mar 17 23:07:57 2008 -0700 first check in with one or two specs diff --git a/lib/couchrest.rb b/lib/couchrest.rb new file mode 100644 index 0000000..71b2d27 --- /dev/null +++ b/lib/couchrest.rb @@ -0,0 +1,13 @@ +require 'uri' + +class Couchrest + + def initialize server + @server = URI.parse server + end + + def databases + + end + +end diff --git a/spec/couchrest_spec.rb b/spec/couchrest_spec.rb new file mode 100644 index 0000000..ba24896 --- /dev/null +++ b/spec/couchrest_spec.rb @@ -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 \ No newline at end of file