Moving expected output into variable to make asserts more readable
This commit is contained in:
parent
b006810f17
commit
df585aa5c6
|
@ -92,8 +92,9 @@ class TestExcerpt < JekyllUnitTest
|
||||||
context "#content" do
|
context "#content" do
|
||||||
context "before render" do
|
context "before render" do
|
||||||
should "be the first paragraph of the page" do
|
should "be the first paragraph of the page" do
|
||||||
assert_equal "First paragraph with [link ref][link].\n\n[link]:"\
|
expected = "First paragraph with [link ref][link].\n\n[link]: "\
|
||||||
" http://www.jekyllrb.com/", @excerpt.content
|
"http://www.jekyllrb.com/"
|
||||||
|
assert_equal expected, @excerpt.content
|
||||||
end
|
end
|
||||||
|
|
||||||
should "contain any refs at the bottom of the page" do
|
should "contain any refs at the bottom of the page" do
|
||||||
|
@ -109,8 +110,9 @@ class TestExcerpt < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "be the first paragraph of the page" do
|
should "be the first paragraph of the page" do
|
||||||
assert_equal "<p>First paragraph with <a href=\"http://www.jekyllrb.com/\">"\
|
expected = "<p>First paragraph with <a href=\"http://www.jekyllrb.com/\">link "\
|
||||||
"link ref</a>.</p>\n\n", @extracted_excerpt.output
|
"ref</a>.</p>\n\n"
|
||||||
|
assert_equal expected, @extracted_excerpt.output
|
||||||
end
|
end
|
||||||
|
|
||||||
should "link properly" do
|
should "link properly" do
|
||||||
|
|
Loading…
Reference in New Issue