Permalink
Browse files

Merge pull request #169 from JoshCheek/fix_page_file_dir_option

Fix page_file_dir option
  • Loading branch information...
2 parents 23508d3 + 3015831 commit 401e41b699d13a6926da4c1758eabcd2cc0a661a @technoweenie technoweenie committed Jun 8, 2011
Showing with 6 additions and 1 deletion.
  1. +1 −1 lib/gollum/committer.rb
  2. +5 −0 test/test_wiki.rb
View
@@ -118,7 +118,7 @@ def add_to_index(dir, name, format, data, allow_same_ext = false)
def update_working_dir(dir, name, format)
unless @wiki.repo.bare
if @wiki.page_file_dir
- dir = dir.size.zero? ? @wiki.page_file_dir : File.join(dir, @wiki.page_file_dir)
+ dir = dir.size.zero? ? @wiki.page_file_dir : ::File.join(dir, @wiki.page_file_dir)
end
path =
View
@@ -282,6 +282,11 @@
assert_equal "Hi", File.read(File.join(@path, @page_file_dir, "New-Page.md"))
assert !File.exist?(File.join(@path, "New-Page.md"))
end
+
+ test "edit a page in a sub directory" do
+ page = @wiki.page('foo')
+ @wiki.update_page(page, page.name, page.format, 'new contents', commit_details)
+ end
test "a file in page file dir should be found" do
assert @wiki.page("foo")

0 comments on commit 401e41b

Please sign in to comment.