Fix Liquid::Template inheritance (#1227)

self.class.default_resource_limits would return `nil` in a subclass, since
the attribute isn't set on subclasses.
This commit is contained in:
Dylan Thacker-Smith
2020-01-21 15:09:22 -05:00
committed by GitHub
parent 9c538f4237
commit e9b649b345
2 changed files with 9 additions and 3 deletions
+7
View File
@@ -77,4 +77,11 @@ class TemplateUnitTest < Minitest::Test
ensure
Template.tags.delete('fake')
end
class TemplateSubclass < Liquid::Template
end
def test_template_inheritance
assert_equal("foo", TemplateSubclass.parse("foo").render)
end
end