spec/search_spec.rb in searchlogic-2.3.9 vs spec/search_spec.rb in searchlogic-2.3.10

- old
+ new

@@ -363,7 +363,15 @@ search1 = User.search(:username => "bjohnson") search2 = User.search(:username => "nosnhojb") search1.empty?.should == false search2.empty?.should == true end + + it "should delegate to named scopes with arity > 1" do + User.named_scope :paged, lambda {|start, limit| { :limit => limit, :offset => start }} + User.create(:username => "bjohnson") + search = User.search(:username => "bjohnson") + search.paged(0, 1).count.should == 1 + search.paged(0, 0).count.should == 0 + end end end