diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-02-25 13:14:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 13:14:59 -0800 |
commit | d1f68b50487ea1a8fc7f822973e2cc46d1288060 (patch) | |
tree | 4d300572bd347f8c20e93933eff9b7186a8fc3b3 /actionview/test/template | |
parent | 5330a342852147ecd65a16f83bc51e688c8bb9eb (diff) | |
parent | 12ff6064d169366e554b11a25813d82701435253 (diff) | |
download | rails-d1f68b50487ea1a8fc7f822973e2cc46d1288060.tar.gz rails-d1f68b50487ea1a8fc7f822973e2cc46d1288060.tar.bz2 rails-d1f68b50487ea1a8fc7f822973e2cc46d1288060.zip |
Merge pull request #35404 from rails/no-nil-format-on-templates
No nil format on templates
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/template_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionview/test/template/template_test.rb b/actionview/test/template/template_test.rb index a069c8f2d0..36caef28c2 100644 --- a/actionview/test/template/template_test.rb +++ b/actionview/test/template/template_test.rb @@ -38,7 +38,8 @@ class TestERBTemplate < ActiveSupport::TestCase "<%= @virtual_path %>", "partial", ERBHandler, - virtual_path: "partial" + virtual_path: "partial", + format: :html ) end @@ -55,7 +56,8 @@ class TestERBTemplate < ActiveSupport::TestCase end end - def new_template(body = "<%= hello %>", details = { format: :html }) + def new_template(body = "<%= hello %>", details = {}) + details = { format: :html }.merge details ActionView::Template.new(body.dup, "hello template", details.fetch(:handler) { ERBHandler }, { virtual_path: "hello" }.merge!(details)) end |