first check in with one or two specs
This commit is contained in:
commit
2c42cf1ca5
2 changed files with 52 additions and 0 deletions
13
lib/couchrest.rb
Normal file
13
lib/couchrest.rb
Normal 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
39
spec/couchrest_spec.rb
Normal 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
|
Loading…
Reference in a new issue