diff --git a/lib/gollum/blob_entry.rb b/lib/gollum/blob_entry.rb index 14ef59b9..b224fc4a 100644 --- a/lib/gollum/blob_entry.rb +++ b/lib/gollum/blob_entry.rb @@ -43,6 +43,10 @@ module Gollum page end + def inspect + %(#) + end + # Normalizes a given directory name for searching through tree paths. # Ensures that a directory begins with a slash, or # diff --git a/test/test_wiki.rb b/test/test_wiki.rb index 3749e443..b5f52030 100644 --- a/test/test_wiki.rb +++ b/test/test_wiki.rb @@ -64,8 +64,13 @@ context "Wiki" do @wiki.tree_map_for 'master' assert_equal({"master"=>"60f12f4254f58801b9ee7db7bca5fa8aeefaa56b"}, @wiki.ref_map) - entry = @wiki.tree_map['60f12f4254f58801b9ee7db7bca5fa8aeefaa56b'][0] - assert_equal 'Bilbo-Baggins.md', entry.path + map = @wiki.tree_map['60f12f4254f58801b9ee7db7bca5fa8aeefaa56b'] + assert_equal 'Bilbo-Baggins.md', map[0].path + assert_equal '', map[0].dir + assert_equal map[0].path, map[0].name + assert_equal 'Mordor/Eye-Of-Sauron.md', map[3].path + assert_equal '/Mordor', map[3].dir + assert_equal 'Eye-Of-Sauron.md', map[3].name end test "#tree_map_for only caches tree for commit" do