aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template/render_test.rb')
-rw-r--r--actionview/test/template/render_test.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb
index b8d8717db4..3f298d81f3 100644
--- a/actionview/test/template/render_test.rb
+++ b/actionview/test/template/render_test.rb
@@ -631,9 +631,8 @@ class CachedViewRenderTest < ActiveSupport::TestCase
# Ensure view path cache is primed
def setup
+ ActionView::LookupContext::DetailsKey.clear
view_paths = ActionController::Base.view_paths
- view_paths.each(&:clear_cache)
- ActionView::LookupContext.fallbacks.each(&:clear_cache)
assert_equal ActionView::OptimizedFileSystemResolver, view_paths.first.class
setup_view(view_paths)
end
@@ -650,9 +649,7 @@ class LazyViewRenderTest < ActiveSupport::TestCase
# Test the same thing as above, but make sure the view path
# is not eager loaded
def setup
- view_paths = ActionController::Base.view_paths
- view_paths.each(&:clear_cache)
- ActionView::LookupContext.fallbacks.each(&:clear_cache)
+ ActionView::LookupContext::DetailsKey.clear
path = ActionView::FileSystemResolver.new(FIXTURE_LOAD_PATH)
view_paths = ActionView::PathSet.new([path])
assert_equal ActionView::FileSystemResolver.new(FIXTURE_LOAD_PATH), view_paths.first
@@ -710,10 +707,10 @@ class CachedCollectionViewRenderTest < ActiveSupport::TestCase
# Ensure view path cache is primed
setup do
+ ActionView::LookupContext::DetailsKey.clear
+
view_paths = ActionController::Base.view_paths
assert_equal ActionView::OptimizedFileSystemResolver, view_paths.first.class
- view_paths.each(&:clear_cache)
- ActionView::LookupContext.fallbacks.each(&:clear_cache)
ActionView::PartialRenderer.collection_cache = ActiveSupport::Cache::MemoryStore.new