start work on formatted_page

This commit is contained in:
Tom Preston-Werner
2010-04-08 16:20:05 -07:00
parent c8d9b351e2
commit 3ff115048d
7 changed files with 110 additions and 13 deletions
+8 -2
View File
@@ -2,10 +2,16 @@ require 'helper'
context "Page" do
setup do
@repo = Gollum::Repo.new("examples/lotr.git")
@wiki = Gollum::Wiki.new(testpath("examples/lotr.git"))
end
test "formatted page" do
page = @repo.formatted_page('Bilbo-Baggins')
page = @wiki.formatted_page('Bilbo Baggins')
assert_equal Gollum::Page, page.class
assert page.data =~ /^# Bilbo Baggins\n\nBilbo Baggins/
end
test "no page match" do
assert_nil @wiki.formatted_page('I do not exist')
end
end