added autovalidation (auto_validate! in your ExtendedDocument) and extracted some extlib stuff so we will soon be able to remove the dependency.
This commit is contained in:
parent
e9930c5a86
commit
890b60cae4
18 changed files with 497 additions and 52 deletions
|
@ -2,17 +2,17 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|||
|
||||
describe CouchRest::Server do
|
||||
|
||||
before(:all) do
|
||||
@couch = CouchRest::Server.new
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
@couch.available_databases.each do |ref, db|
|
||||
db.delete!
|
||||
end
|
||||
end
|
||||
|
||||
describe "available databases" do
|
||||
before(:each) do
|
||||
@couch = CouchRest::Server.new
|
||||
end
|
||||
|
||||
after(:each) do
|
||||
@couch.available_databases.each do |ref, db|
|
||||
db.delete!
|
||||
end
|
||||
end
|
||||
|
||||
it "should let you add more databases" do
|
||||
@couch.available_databases.should be_empty
|
||||
@couch.define_available_database(:default, "cr-server-test-db")
|
||||
|
@ -20,6 +20,7 @@ describe CouchRest::Server do
|
|||
end
|
||||
|
||||
it "should verify that a database is available" do
|
||||
@couch.define_available_database(:default, "cr-server-test-db")
|
||||
@couch.available_database?(:default).should be_true
|
||||
@couch.available_database?("cr-server-test-db").should be_true
|
||||
@couch.available_database?(:matt).should be_false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue