mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Move I18n to options
This commit is contained in:
@@ -144,17 +144,16 @@ class TemplateTest < Test::Unit::TestCase
|
||||
assert_equal 'haha', t.parse("{{baz}}").render(drop)
|
||||
end
|
||||
|
||||
def test_sets_default_localization_in_context
|
||||
def test_sets_default_localization_in_document
|
||||
t = Template.new
|
||||
assert_instance_of I18n, t.registers[:locale]
|
||||
assert_instance_of I18n, t.root.options[:locale]
|
||||
end
|
||||
|
||||
def test_sets_default_localization_in_context_with_quick_initialization
|
||||
t = Template.new
|
||||
t.registers[:locale] = I18n.new(fixture("en_locale.yml"))
|
||||
t.parse('{{foo}}')
|
||||
t.parse('{{foo}}', locale: I18n.new(fixture("en_locale.yml")))
|
||||
|
||||
assert_instance_of I18n, t.registers[:locale]
|
||||
assert_equal fixture("en_locale.yml"), t.registers[:locale].path
|
||||
assert_instance_of I18n, t.root.options[:locale]
|
||||
assert_equal fixture("en_locale.yml"), t.root.options[:locale].path
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user