Merge pull request #401 from nature/make_gollum_search_count_additive

Update the Wiki.search function to make the results counts 'additive'.
This commit is contained in:
bootstraponline
2012-06-22 09:49:04 -07:00
2 changed files with 17 additions and 12 deletions
+7
View File
@@ -437,6 +437,13 @@ context "page_file_dir option" do
assert_equal "docs/foo", results[0][:name]
end
test "search results should make the content/filename search additive" do
# This file contains the word 'foo' and is called 'foo', so it should
# have a count of 2, not 1...
results = @wiki.search("foo")
assert_equal 2, results[0][:count]
end
teardown do
FileUtils.rm_r(@path)
end