add Gollum::Wiki#exist?

This commit is contained in:
rick
2010-06-21 15:22:21 -07:00
parent ad299f0105
commit 4fe728b38a
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -10,6 +10,13 @@ module Gollum
@repo = Grit::Repo.new(path)
end
# Public: check whether the wiki's git repo exists on the filesystem.
#
# Returns true if the repo exists, and false if it does not.
def exist?
@repo.git.exist?
end
# Public: Get the formatted page for a given page name.
#
# name - The human or canonical String page name of the wiki page.
+1
View File
@@ -11,6 +11,7 @@ context "Wiki" do
test "git repo" do
assert_equal Grit::Repo, @wiki.repo.class
assert @wiki.exist?
end
end