mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Address code review comments
- clean up comment wording - fix potentially leaky tests
This commit is contained in:
@@ -57,6 +57,14 @@ module Minitest
|
||||
Liquid::Strainer.class_variable_set(:@@filters, original_filters)
|
||||
end
|
||||
|
||||
def with_taint_mode(mode)
|
||||
old_mode = Liquid::Template.taint_mode
|
||||
Liquid::Template.taint_mode = mode
|
||||
yield
|
||||
ensure
|
||||
Liquid::Template.taint_mode = old_mode
|
||||
end
|
||||
|
||||
def with_error_mode(mode)
|
||||
old_mode = Liquid::Template.error_mode
|
||||
Liquid::Template.error_mode = mode
|
||||
|
||||
Reference in New Issue
Block a user