Document: only superdirectories of the collection are categories

This commit is contained in:
Parker Moore
2015-11-04 15:18:02 +07:00
parent 6e8fd8cb50
commit db6103bdee
4 changed files with 47 additions and 7 deletions

View File

@@ -220,7 +220,7 @@ class TestSite < JekyllUnitTest
posts = Dir[source_dir("**", "_posts", "**", "*")]
posts.delete_if { |post| File.directory?(post) && !(post =~ Document::DATE_FILENAME_MATCHER) }
categories = %w(2013 bar baz category foo z_category MixedCase Mixedcase es publish_test win).sort
categories = %w(2013 bar baz category foo z_category MixedCase Mixedcase publish_test win).sort
assert_equal posts.size - @num_invalid_posts, @site.posts.size
assert_equal categories, @site.categories.keys.sort

View File

@@ -455,8 +455,8 @@ CONTENT
end
should "have the url to the \"nested\" post from 2008-11-21" do
assert_match %r{3\s/es/2008/11/21/nested/}, @result
assert_match %r{4\s/es/2008/11/21/nested/}, @result
assert_match %r{3\s/2008/11/21/nested/}, @result
assert_match %r{4\s/2008/11/21/nested/}, @result
end
end