test/test-result-set.rb in activegroonga-1.0.5 vs test/test-result-set.rb in activegroonga-1.0.6

- old
+ new

@@ -138,6 +138,20 @@ bookmarks = Bookmark.select assert_equal([User.find(@user_records[:daijiro].id)].sort, bookmarks.sort(["user"], :limit => 1).collect(&:user)) end end + + class TestEmpty < self + def test_have_records + all_bookmarks = Bookmark.all + assert_not_predicate(all_bookmarks, :empty?) + end + + def test_not_have_records + no_bookmarks = Bookmark.select do |bookmark| + bookmark.uri == "http://example.com/" + end + assert_predicate(no_bookmarks, :empty?) + end + end end