Started on the ExtendedDocument class with features moved to mixins.

Properties got added, they define getters, setters and aliases.
They will also be the base of the new validation system.
This commit is contained in:
Matt Aimonetti 2009-01-29 18:45:01 -08:00
parent 90f460641e
commit d6665e55ca
12 changed files with 539 additions and 8 deletions

View file

@ -30,6 +30,9 @@ describe CouchRest::Document do
end
describe "default database" do
before(:each) do
Video.use_database nil
end
it "should be set using use_database on the model" do
Video.new.database.should be_nil
Video.use_database @db
@ -59,9 +62,11 @@ describe CouchRest::Document do
@doc.rev.should be_nil
@doc.id.should be_nil
end
it "should freak out when saving without a database" do
lambda{@doc.save}.should raise_error(ArgumentError)
end
end
# move to database spec