Sha256: 4a6fbf1163a7501a4fcd38139a78ce046fd75da1b6f0c3d21f1a6c8035637d42
Contents?: true
Size: 623 Bytes
Versions: 15
Compression:
Stored size: 623 Bytes
Contents
require 'acceptance/spec_helper' describe 'Paginating search results', :live => true do it "tracks how many results there are in total" do 21.times { |number| Article.create :title => "Article #{number}" } index Article.search.total_entries.should == 21 end it "paginates the result set by default" do 21.times { |number| Article.create :title => "Article #{number}" } index Article.search.length.should == 20 end it "tracks the number of pages" do 21.times { |number| Article.create :title => "Article #{number}" } index Article.search.total_pages.should == 2 end end
Version data entries
15 entries across 15 versions & 1 rubygems