Sha256: aa7f31022383ba600b701ae9c2293a607552c1a0d25ed8345647d4d67a76e5ea

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

# Copyright (C) 2010  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

class TestResultSet < Test::Unit::TestCase
  include ActiveGroongaTestUtils

  def test_paginate
    bookmarks = Bookmark.select
    assert_equal(["http://cutter.sourceforge.net/"].sort,
                 bookmarks.paginate(["uri"], :size => 1).collect(&:uri))
  end

  def test_sort
    bookmarks = Bookmark.select
    assert_equal(["http://cutter.sourceforge.net/"].sort,
                 bookmarks.sort(["uri"], :limit => 1).collect(&:uri))
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activegroonga-1.0.4 test/test-result-set.rb
activegroonga-1.0.3 test/test-result-set.rb
activegroonga-1.0.1 test/test-result-set.rb
activegroonga-1.0.0 test/test-result-set.rb