parent
e0e4a47af1
commit
2292e4268c
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Category in YAML
|
||||||
|
categories:
|
||||||
|
---
|
||||||
|
|
||||||
|
Best *post* ever
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Category in YAML
|
||||||
|
category:
|
||||||
|
---
|
||||||
|
|
||||||
|
Best *post* ever
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: A Tag
|
||||||
|
tag:
|
||||||
|
---
|
||||||
|
|
||||||
|
Whoa.
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: Some Tags
|
||||||
|
tags:
|
||||||
|
---
|
||||||
|
|
||||||
|
Awesome!
|
|
@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "ensure post count is as expected" do
|
should "ensure post count is as expected" do
|
||||||
assert_equal 18, @site.posts.size
|
assert_equal 22, @site.posts.size
|
||||||
end
|
end
|
||||||
|
|
||||||
should "insert site.posts into the index" do
|
should "insert site.posts into the index" do
|
||||||
|
|
|
@ -236,6 +236,16 @@ class TestPost < Test::Unit::TestCase
|
||||||
assert post.categories.include?('baz')
|
assert post.categories.include?('baz')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "recognize empty category in yaml" do
|
||||||
|
post = setup_post("2009-01-27-empty-category.textile")
|
||||||
|
assert_equal [], post.categories
|
||||||
|
end
|
||||||
|
|
||||||
|
should "recognize empty categories in yaml" do
|
||||||
|
post = setup_post("2009-01-27-empty-categories.textile")
|
||||||
|
assert_equal [], post.categories
|
||||||
|
end
|
||||||
|
|
||||||
should "recognize tag in yaml" do
|
should "recognize tag in yaml" do
|
||||||
post = setup_post("2009-05-18-tag.textile")
|
post = setup_post("2009-05-18-tag.textile")
|
||||||
assert post.tags.include?('code')
|
assert post.tags.include?('code')
|
||||||
|
@ -248,6 +258,16 @@ class TestPost < Test::Unit::TestCase
|
||||||
assert post.tags.include?('pizza')
|
assert post.tags.include?('pizza')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "recognize empty tag in yaml" do
|
||||||
|
post = setup_post("2009-05-18-empty-tag.textile")
|
||||||
|
assert_equal [], post.tags
|
||||||
|
end
|
||||||
|
|
||||||
|
should "recognize empty tags in yaml" do
|
||||||
|
post = setup_post("2009-05-18-empty-tags.textile")
|
||||||
|
assert_equal [], post.tags
|
||||||
|
end
|
||||||
|
|
||||||
should "allow no yaml" do
|
should "allow no yaml" do
|
||||||
post = setup_post("2009-06-22-no-yaml.textile")
|
post = setup_post("2009-06-22-no-yaml.textile")
|
||||||
assert_equal "No YAML.", post.content
|
assert_equal "No YAML.", post.content
|
||||||
|
|
Loading…
Reference in New Issue