Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add git test fixture for page_file_dir tests

  • Loading branch information...
commit e77cba96fd2ecf51564121d9e7c48c5ee286bc81 1 parent f6f8428
@technoweenie technoweenie authored
View
1  test/examples/page_file_dir.git/COMMIT_EDITMSG
@@ -0,0 +1 @@
+initial commit
View
1  test/examples/page_file_dir.git/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
View
6 test/examples/page_file_dir.git/config
@@ -0,0 +1,6 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+ ignorecase = true
View
1  test/examples/page_file_dir.git/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
View
BIN  test/examples/page_file_dir.git/index
Binary file not shown
View
6 test/examples/page_file_dir.git/info/exclude
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
View
1  test/examples/page_file_dir.git/logs/HEAD
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 22b404803c966dd92865614d86ff22ca12e50c1e rick <technoweenie@gmail.com> 1295287591 -0800 commit (initial): initial commit
View
1  test/examples/page_file_dir.git/logs/refs/heads/master
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 22b404803c966dd92865614d86ff22ca12e50c1e rick <technoweenie@gmail.com> 1295287591 -0800 commit (initial): initial commit
View
BIN  test/examples/page_file_dir.git/objects/0c/7d27db1f575263efdcab3dc650f4502a2dbcbf
Binary file not shown
View
BIN  test/examples/page_file_dir.git/objects/22/b404803c966dd92865614d86ff22ca12e50c1e
Binary file not shown
View
BIN  test/examples/page_file_dir.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99
Binary file not shown
View
BIN  test/examples/page_file_dir.git/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6
Binary file not shown
View
BIN  test/examples/page_file_dir.git/objects/5b/43e14e0a15fb6f08feab1773d1c0991e9f71e2
Binary file not shown
View
1  test/examples/page_file_dir.git/refs/heads/master
@@ -0,0 +1 @@
+22b404803c966dd92865614d86ff22ca12e50c1e
View
13 test/test_wiki.rb
@@ -288,18 +288,9 @@
context "page_file_dir option" do
setup do
- @path = testpath('examples/pfdtest')
+ @path = cloned_testpath('examples/page_file_dir')
@repo = Grit::Repo.init(@path)
@page_file_dir = 'docs'
- Dir.chdir(@path) do
- Dir.mkdir(@page_file_dir)
- File.open("docs/foo.md", "w"){|f| f.print "Hello foo" }
- @repo.add("docs/foo.md")
- File.open("bar.md", "w"){|f| f.print "Hello bar" }
- @repo.add("bar.md")
- @repo.commit_index("Added docs/foo.md and bar.md")
- end
-
@wiki = Gollum::Wiki.new(@path, :page_file_dir => @page_file_dir)
end
@@ -318,7 +309,7 @@
end
test "search results should be restricted in page filer dir" do
- results = @wiki.search("Hello")
+ results = @wiki.search("foo")
assert_equal 1, results.size
assert_equal "foo", results[0][:name]
end
Please sign in to comment.
Something went wrong with that request. Please try again.