diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-25 13:18:44 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-25 13:18:44 -0800 |
commit | ca5e23ed4d8818d81314953aadd422b2cbde63b0 (patch) | |
tree | a411836c47d0ac22af072ec580656e983954d131 /actionview/test/template/testing/fixture_resolver_test.rb | |
parent | d1f68b50487ea1a8fc7f822973e2cc46d1288060 (diff) | |
download | rails-ca5e23ed4d8818d81314953aadd422b2cbde63b0.tar.gz rails-ca5e23ed4d8818d81314953aadd422b2cbde63b0.tar.bz2 rails-ca5e23ed4d8818d81314953aadd422b2cbde63b0.zip |
Templates have one format
Templates only have one format. Before this commit, templates would be
constructed with a single element array that contained the format. This
commit eliminates the single element array and just implements a
`format` method. This saves one array allocation per template.
Diffstat (limited to 'actionview/test/template/testing/fixture_resolver_test.rb')
-rw-r--r-- | actionview/test/template/testing/fixture_resolver_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/test/template/testing/fixture_resolver_test.rb b/actionview/test/template/testing/fixture_resolver_test.rb index 9954e3500d..4361824a71 100644 --- a/actionview/test/template/testing/fixture_resolver_test.rb +++ b/actionview/test/template/testing/fixture_resolver_test.rb @@ -15,6 +15,6 @@ class FixtureResolverTest < ActiveSupport::TestCase assert_equal 1, templates.size, "expected one template" assert_equal "this text", templates.first.source assert_equal "arbitrary/path", templates.first.virtual_path - assert_equal [:html], templates.first.formats + assert_equal :html, templates.first.format end end |