Add Wiki#size to efficiently count pages without loading them.

This commit is contained in:
rick
2010-08-30 17:52:20 -07:00
parent 6dab4f7fe6
commit 646c8e21b2
3 changed files with 16 additions and 0 deletions
+4
View File
@@ -39,6 +39,10 @@ context "Wiki" do
pages.map { |p| p.filename }.sort
end
test "counts pages" do
assert_equal 4, @wiki.size
end
test "normalizes commit hash" do
commit = {:message => 'abc'}
assert_equal({:message => 'abc', :name => 'Anonymous', :email => 'anon@anon.com'},