From df585aa5c61c5e9552e32e473617be19474293e9 Mon Sep 17 00:00:00 2001 From: Brint O'Hearn Date: Mon, 16 May 2016 20:13:50 -0500 Subject: [PATCH] Moving expected output into variable to make asserts more readable --- test/test_excerpt.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/test_excerpt.rb b/test/test_excerpt.rb index e91fb7c0..6e4b8cbf 100644 --- a/test/test_excerpt.rb +++ b/test/test_excerpt.rb @@ -92,8 +92,9 @@ class TestExcerpt < JekyllUnitTest context "#content" do context "before render" do should "be the first paragraph of the page" do - assert_equal "First paragraph with [link ref][link].\n\n[link]:"\ - " http://www.jekyllrb.com/", @excerpt.content + expected = "First paragraph with [link ref][link].\n\n[link]: "\ + "http://www.jekyllrb.com/" + assert_equal expected, @excerpt.content end should "contain any refs at the bottom of the page" do @@ -109,8 +110,9 @@ class TestExcerpt < JekyllUnitTest end should "be the first paragraph of the page" do - assert_equal "

First paragraph with "\ - "link ref.

\n\n", @extracted_excerpt.output + expected = "

First paragraph with link "\ + "ref.

\n\n" + assert_equal expected, @extracted_excerpt.output end should "link properly" do