From 57fdc1b5fbb5323145572438d4f92a0c11120db1 Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Tue, 6 Sep 2022 16:23:13 -0400 Subject: [PATCH] Add sample use of partials assert_template_result options --- test/integration/blank_test.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/test/integration/blank_test.rb b/test/integration/blank_test.rb index e3a82c29..b7ca205d 100644 --- a/test/integration/blank_test.rb +++ b/test/integration/blank_test.rb @@ -9,12 +9,6 @@ class FoobarTag < Liquid::Tag end end -class BlankTestFileSystem - def read_template_file(template_path) - template_path - end -end - class BlankTest < Minitest::Test include Liquid N = 10 @@ -95,10 +89,12 @@ class BlankTest < Minitest::Test end def test_include_is_blank - Liquid::Template.file_system = BlankTestFileSystem.new - assert_template_result("foobar" * (N + 1), wrap("{% include 'foobar' %}")) - assert_template_result(" foobar " * (N + 1), wrap("{% include ' foobar ' %}")) - assert_template_result(" " * (N + 1), wrap(" {% include ' ' %} ")) + assert_template_result("foobar" * (N + 1), wrap("{% include 'foobar' %}"), + partials: { 'foobar' => 'foobar' }) + assert_template_result(" foobar " * (N + 1), wrap("{% include ' foobar ' %}"), + partials: { ' foobar ' => ' foobar ' }) + assert_template_result(" " * (N + 1), wrap(" {% include ' ' %} "), + partials: { ' ' => ' ' }) end def test_case_is_blank