From f9bea6304dfba902b1937b3bc29b1ebc2f67e55b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 23 Jan 2019 14:19:50 -0800 Subject: Move templates to an anonymous subclass of AV::Base Now we can throw away the subclass and the generated methods will get GC'd too --- actionview/test/template/log_subscriber_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionview/test/template/log_subscriber_test.rb') diff --git a/actionview/test/template/log_subscriber_test.rb b/actionview/test/template/log_subscriber_test.rb index 9fcf80bb24..7f98207e3d 100644 --- a/actionview/test/template/log_subscriber_test.rb +++ b/actionview/test/template/log_subscriber_test.rb @@ -12,9 +12,12 @@ class AVLogSubscriberTest < ActiveSupport::TestCase super view_paths = ActionController::Base.view_paths + view_paths.each(&:clear_cache) + ActionView::LookupContext.fallbacks.each(&:clear_cache) + lookup_context = ActionView::LookupContext.new(view_paths, {}, ["test"]) renderer = ActionView::Renderer.new(lookup_context) - @view = ActionView::Base.new(renderer, {}) + @view = ActionView::Base.with_empty_template_cache.new(renderer, {}) ActionView::LogSubscriber.attach_to :action_view -- cgit v1.2.3