mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
write posts to disk
This commit is contained in:
@@ -41,4 +41,14 @@ class TestPost < Test::Unit::TestCase
|
||||
|
||||
assert_equal "<<< \nh1. Foo Bar\n\nBest post ever >>>", p.content
|
||||
end
|
||||
|
||||
def test_write
|
||||
dest = File.join(File.dirname(__FILE__), *%w[dest])
|
||||
FileUtils.rm_rf(dest)
|
||||
|
||||
p = Post.new(File.join(File.dirname(__FILE__), *%w[source posts]), "2008-10-18-foo-bar.textile")
|
||||
layouts = {"default" => "<<< {{ content }} >>>"}
|
||||
p.add_layout(layouts)
|
||||
p.write(dest)
|
||||
end
|
||||
end
|
||||
@@ -21,4 +21,10 @@ class TestSite < Test::Unit::TestCase
|
||||
|
||||
assert_equal 1, @s.posts.size
|
||||
end
|
||||
|
||||
def test_write_posts
|
||||
@s.process
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user