test/test_post.rb in mattmatt-jekyll-0.4.1 vs test/test_post.rb in mattmatt-jekyll-0.4.3

- old
+ new

@@ -82,16 +82,24 @@ end def test_yaml_category p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), '', "2009-01-27-category.textile") assert p.categories.include?('foo') + assert p.data['categories'].include?('foo') end def test_yaml_categories p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), '', "2009-01-27-categories.textile") assert p.categories.include?('foo') assert p.categories.include?('bar') assert p.categories.include?('baz') + assert p.data['categories'].include?('foo') + end + + def test_empty_yaml_categories + p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), '', "2009-01-27-no-categories.textile") + assert p.categories.empty? + assert p.data['categories'].empty? end def test_render p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), '', "2008-10-18-foo-bar.textile") layouts = {"default" => Layout.new(File.join(File.dirname(__FILE__), *%w[source _layouts]), "simple.html")}