From adcaaaf59a2f0a6e162725d64163c7e040bd6af0 Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Sat, 11 Oct 2008 09:55:21 -0700 Subject: [PATCH] fixed specs when run under rake --- spec/couchrest/core/model_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/couchrest/core/model_spec.rb b/spec/couchrest/core/model_spec.rb index 57c84c5..9667fee 100644 --- a/spec/couchrest/core/model_spec.rb +++ b/spec/couchrest/core/model_spec.rb @@ -419,7 +419,8 @@ describe CouchRest::Model do Course.new(:title => 'aaa').save Course.new(:title => 'bbb').save end - it "should make the design doc" do + it "should make the design doc upon first query" do + Course.by_title doc = Course.design_doc doc['views']['all']['map'].should include('Course') end @@ -496,7 +497,7 @@ describe CouchRest::Model do newdocs["rows"].length.should == @design_docs["rows"].length end it "should create a new design document on view access" do - Article.view_by :created_at + Article.view_by :updated_at Article.by_created_at newdocs = Article.database.documents :startkey => "_design/", :endkey => "_design/\u9999" newdocs["rows"].length.should == @design_docs["rows"].length + 1