garaio/xapian_db — pull request #41 by halfbyte (2013-11-27 23:03:23+00:00)
Title: Fixing total_pages in ResultSet

ResultSet#total_pages is used by will_paginate etc. to determine the length of
the paginator. If I'm not totally wrong, this number has been calculated in the
wrong way, as it was determined by limit / per_page, where limit, when not passed
in as an option, defaults to the database_size. What we actually want is
hits / per_page of course.

Tests are changed accordingly.