From d4015a7f0609f12a5f7be4c794e5c5eaf2c748d5 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 25 Feb 2019 15:14:53 -0800 Subject: Pass locals in to the template object on construction This commit ensures that locals are passed in to the template objects when they are constructed, then removes the `locals=` mutator on the template object. This means we don't need to mutate Template objects with locals in the `decorate` method. --- actionview/test/actionpack/controller/view_paths_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actionview/test/actionpack') diff --git a/actionview/test/actionpack/controller/view_paths_test.rb b/actionview/test/actionpack/controller/view_paths_test.rb index a7a58a78cc..4449d08496 100644 --- a/actionview/test/actionpack/controller/view_paths_test.rb +++ b/actionview/test/actionpack/controller/view_paths_test.rb @@ -143,8 +143,9 @@ class ViewLoadPathsTest < ActionController::TestCase "Decorated body", template.identifier, template.handler, - virtual_path: template.virtual_path, - format: template.format + virtual_path: template.virtual_path, + format: template.format, + locals: template.locals ) end end -- cgit v1.2.3