new test: ensure the correct excerpt is exposed to liquid
Also shorten test code a little bit.
This commit is contained in:
parent
951ee09a75
commit
b10e06ce47
|
@ -6,3 +6,5 @@ excerpt: 'I can set a custom excerpt with *markdown*'
|
|||
This is not my excerpt.
|
||||
|
||||
Neither is this.
|
||||
|
||||
I can use the excerpt: <quote>{{page.excerpt}}</quote>
|
|
@ -324,15 +324,18 @@ class TestPost < Test::Unit::TestCase
|
|||
context "with custom excerpt" do
|
||||
setup do
|
||||
file = "2013-04-11-custom-excerpt.markdown"
|
||||
@post.process(file)
|
||||
@post.read_yaml(@source, file)
|
||||
@post.transform
|
||||
@post = setup_post(file)
|
||||
do_render(@post)
|
||||
end
|
||||
|
||||
should "use custom excerpt" do
|
||||
assert_equal("<p>I can set a custom excerpt with <em>markdown</em></p>", @post.excerpt)
|
||||
end
|
||||
|
||||
should "expose custom excerpt to liquid" do
|
||||
assert @post.content.include?("I can use the excerpt: <quote><p>I can set a custom excerpt with <em>markdown</em></p></quote>")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue