From 2c42cf1ca50da71bb10c35fb74574bebe7bbffad Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Mon, 17 Mar 2008 23:07:57 -0700 Subject: [PATCH] first check in with one or two specs --- lib/couchrest.rb | 13 +++++++++++++ spec/couchrest_spec.rb | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 lib/couchrest.rb create mode 100644 spec/couchrest_spec.rb 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