assert_template_result: Avoid using the BlankFileSystem

Since it doesn't reflect the real liquid usage that we are trying
to test against.
This commit is contained in:
Dylan Thacker-Smith
2022-10-28 13:55:33 -04:00
parent 3e8994c258
commit f484b868d0
+1 -1
View File
@@ -42,7 +42,7 @@ module Minitest
message: nil, partials: nil, error_mode: nil, render_errors: false
)
template = Liquid::Template.parse(template, line_numbers: true, error_mode: error_mode&.to_sym)
file_system = StubFileSystem.new(partials) if partials
file_system = StubFileSystem.new(partials || {})
registers = Liquid::Registers.new(file_system: file_system)
context = Liquid::Context.build(environments: assigns, rethrow_errors: !render_errors, registers: registers)
output = template.render(context)