spec/unit/mongoid/contexts/mongo_spec.rb in mongoid-1.2.3 vs spec/unit/mongoid/contexts/mongo_spec.rb in mongoid-1.2.4
- old
+ new
@@ -335,10 +335,12 @@
before do
@collection = mock
Person.expects(:collection).returns(@collection)
@criteria = Person.where(:_id => "1").skip(60).limit(20)
@context = Mongoid::Contexts::Mongo.new(@criteria.selector, @criteria.options, Person)
- @collection.expects(:find).with({:_type => { "$in" => ["Doctor", "Person"] }, :_id => "1"}, :skip => 60, :limit => 20).returns([])
+ @collection.expects(:find).with(
+ {:_type => { "$in" => ["Doctor", "Person"] }, :_id => "1"}, :skip => 60, :limit => 20
+ ).returns([])
@results = @context.paginate
end
it "executes and paginates the results" do
@results.current_page.should == 4