diff options
author | Matthew Draper <matthew@trebex.net> | 2016-12-09 09:50:54 +1030 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 09:50:54 +1030 |
commit | 81608cda9c0e3a3e70dc189481f68129ed74b8ba (patch) | |
tree | 1e8d0d45d3594bc99a0f2eff17eb32e787c451d1 /actionview/test | |
parent | 847e9dd5c12b34856f5c74d52bc6c86b1735ffe5 (diff) | |
parent | d9ff835b99ff3c7567ccde9b1379b4deeabee32f (diff) | |
download | rails-81608cda9c0e3a3e70dc189481f68129ed74b8ba.tar.gz rails-81608cda9c0e3a3e70dc189481f68129ed74b8ba.tar.bz2 rails-81608cda9c0e3a3e70dc189481f68129ed74b8ba.zip |
Merge pull request #27303 from toshimaru/fix/partial-variable-block
Enable `block` variable in view
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/fixtures/test/test_template_with_delegation_reserved_keywords.erb | 1 | ||||
-rw-r--r-- | actionview/test/template/compiled_templates_test.rb | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/actionview/test/fixtures/test/test_template_with_delegation_reserved_keywords.erb b/actionview/test/fixtures/test/test_template_with_delegation_reserved_keywords.erb new file mode 100644 index 0000000000..edfe52e422 --- /dev/null +++ b/actionview/test/fixtures/test/test_template_with_delegation_reserved_keywords.erb @@ -0,0 +1 @@ +<%= _ %> <%= arg %> <%= args %> <%= block %>
\ No newline at end of file diff --git a/actionview/test/template/compiled_templates_test.rb b/actionview/test/template/compiled_templates_test.rb index 3ecac46d34..40ac867b38 100644 --- a/actionview/test/template/compiled_templates_test.rb +++ b/actionview/test/template/compiled_templates_test.rb @@ -24,6 +24,16 @@ class CompiledTemplatesTest < ActiveSupport::TestCase assert_equal locals.inspect, render(file: "test/render_file_inspect_local_assigns", locals: locals) end + def test_template_with_delegation_reserved_keywords + locals = { + _: "one", + arg: "two", + args: "three", + block: "four", + } + assert_equal "one two three four", render(file: "test/test_template_with_delegation_reserved_keywords", locals: locals) + end + def test_template_with_unicode_identifier assert_equal "🎂", render(file: "test/render_file_unicode_local", locals: { 🎃: "🎂" }) end |