Pass options to include tags

This commit is contained in:
Tristan Hume
2014-08-21 11:37:09 -04:00
parent dfb6c20493
commit 68af2d6e2a
4 changed files with 41 additions and 3 deletions

View File

@@ -48,6 +48,18 @@ class RenderProfilingTest < Minitest::Test
assert_equal 2, t.profiler[1].line_number
end
def test_profiling_includes_line_numbers_of_included_partials
t = Template.parse("{% include 'a_template' %}", :profile => true)
t.render!
included_children = t.profiler[0].children
# {% assign template_name = 'a_template' %}
assert_equal 1, included_children[0].line_number
# {{ template_name }}
assert_equal 2, included_children[1].line_number
end
def test_profiling_times_the_rendering_of_tokens
t = Template.parse("{% include 'a_template' %}", :profile => true)
t.render!