Update infrastructure that handles parsing switching:

* Remove development helpers from parse context
* Simplify strict_parse_with_error_mode_fallback and update
  documentation
* Add unit tests for `Liquid::Expression` and `Liquid::ParseContext`
* Update test helpers to work better with the `:rigid` mode
This commit is contained in:
Guilherme Carreiro
2025-10-27 16:33:31 +01:00
committed by Guilherme Carreiro
parent 4cd367d971
commit 738540a601
5 changed files with 170 additions and 17 deletions
+5 -3
View File
@@ -82,10 +82,12 @@ module Minitest
Environment.dangerously_override(environment, &blk)
end
def with_error_mode(mode)
def with_error_mode(*modes)
old_mode = Liquid::Environment.default.error_mode
Liquid::Environment.default.error_mode = mode
yield
modes.each do |mode|
Liquid::Environment.default.error_mode = mode
yield
end
ensure
Liquid::Environment.default.error_mode = old_mode
end