mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 02:10:41 -07:00
Add back tests for lax parsing
This commit is contained in:
@@ -9,6 +9,8 @@ rescue LoadError
|
||||
end
|
||||
require File.join(File.dirname(__FILE__), '..', 'lib', 'liquid')
|
||||
|
||||
Liquid::Template.error_mode = :strict
|
||||
|
||||
|
||||
module Test
|
||||
module Unit
|
||||
@@ -24,6 +26,12 @@ module Test
|
||||
|
||||
assert_match expected, Template.parse(template).render(assigns)
|
||||
end
|
||||
|
||||
def with_lax_parsing
|
||||
Liquid::Template.error_mode = :lax
|
||||
yield
|
||||
Liquid::Template.error_mode = :strict
|
||||
end
|
||||
end # Assertions
|
||||
end # Unit
|
||||
end # Test
|
||||
|
||||
Reference in New Issue
Block a user