mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
Merge commit 'bac34fab3a27a12b35add1ecab409b19941e29a6'
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
---
|
||||
layout: default
|
||||
title: Topical Post
|
||||
---
|
||||
|
||||
h1. {{ page.title }}
|
||||
|
||||
This post has a topic.
|
||||
@@ -96,6 +96,12 @@ class TestPost < Test::Unit::TestCase
|
||||
assert_equal "<<< <p>url: /2008/11/21/complex.html<br />\ndate: #{Time.parse("2008-11-21")}<br />\nid: /2008/11/21/complex</p> >>>", p.output
|
||||
end
|
||||
|
||||
def test_categories_and_topics
|
||||
p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), 'foo', 'bar/2008-12-12-topical-post.textile')
|
||||
assert_equal ['foo'], p.categories
|
||||
assert_equal ['bar'], p.topics
|
||||
end
|
||||
|
||||
def test_include
|
||||
Jekyll.source = File.join(File.dirname(__FILE__), *%w[source])
|
||||
p = Post.new(File.join(File.dirname(__FILE__), *%w[source]), '', "2008-12-13-include.markdown")
|
||||
|
||||
@@ -22,9 +22,12 @@ class TestSite < Test::Unit::TestCase
|
||||
assert_equal 4, @s.posts.size
|
||||
end
|
||||
|
||||
def test_write_posts
|
||||
def test_site_payload
|
||||
clear_dest
|
||||
|
||||
@s.process
|
||||
|
||||
assert_equal 5, @s.posts.length
|
||||
assert_equal ['foo'], @s.categories.keys
|
||||
assert_equal 1, @s.categories['foo'].length
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user