test/functional/test_pagination.rb in mongo_mapper-unstable-2009.12.30 vs test/functional/test_pagination.rb in mongo_mapper-unstable-2010.1.4

- old
+ new

@@ -1,20 +1,18 @@ require 'test_helper' class PaginationTest < Test::Unit::TestCase context "Paginating" do setup do - @document = Class.new do - include MongoMapper::Document + @document = Doc do set_collection_name 'users' key :first_name, String key :last_name, String key :age, Integer def self.per_page; 1 end end - @document.collection.remove @doc1 = @document.create({:first_name => 'John', :last_name => 'Nunemaker', :age => '27'}) @doc2 = @document.create({:first_name => 'Steve', :last_name => 'Smith', :age => '28'}) @doc3 = @document.create({:first_name => 'Steph', :last_name => 'Nunemaker', :age => '26'}) end \ No newline at end of file