Move the provides_collection declaration into the Article test fixture, and out of the test, fixing a test case that was failing in ruby 1.9.
Signed-off-by: Will Leinweber <will@bitfission.com>
This commit is contained in:
parent
08cf9e59b6
commit
4a8015b119
|
@ -408,10 +408,6 @@ describe "ExtendedDocument views" do
|
|||
end
|
||||
end
|
||||
it "should provide a class method to get a collection for a view" do
|
||||
class Article
|
||||
provides_collection :article_details, 'Article', 'by_date', :descending => true, :include_docs => true
|
||||
end
|
||||
|
||||
articles = Article.find_all_article_details(:key => Date.today)
|
||||
articles.class.should == Array
|
||||
articles.size.should == 7
|
||||
|
|
1
spec/fixtures/more/article.rb
vendored
1
spec/fixtures/more/article.rb
vendored
|
@ -2,6 +2,7 @@ class Article < CouchRest::ExtendedDocument
|
|||
use_database DB
|
||||
unique_id :slug
|
||||
|
||||
provides_collection :article_details, 'Article', 'by_date', :descending => true, :include_docs => true
|
||||
view_by :date, :descending => true
|
||||
view_by :user_id, :date
|
||||
|
||||
|
|
Loading…
Reference in a new issue