From 517b96207d0e083a42b81414efa9f9b6ba300e03 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 24 Jan 2019 12:43:07 -0800 Subject: Pull generated methods up in to the anonymous subclass Then we don't need the extra module. --- actionview/test/template/render_test.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'actionview/test') diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index 372b85a4a5..b8d8717db4 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -19,15 +19,8 @@ module RenderTestCases end.with_view_paths(paths, @assigns) controller = TestController.new - view = @view - @controller_view = Class.new(controller.view_context_class) do - include view.compiled_method_container - - define_method(:compiled_method_container) do - view.compiled_method_container - end - end.new(controller.view_renderer, controller.view_assigns, controller) + @controller_view = controller.view_context_class.with_empty_template_cache.new(controller.view_renderer, controller.view_assigns, controller) # Reload and register danish language for testing I18n.backend.store_translations "da", {} -- cgit v1.2.3