From c88ff8a5f2a4f31265e006e269fe1e3c236d1ed4 Mon Sep 17 00:00:00 2001 From: Eugene Kenny Date: Fri, 28 Oct 2022 09:54:55 +0100 Subject: [PATCH] Don't mutate ActionView::PathSet Follows https://github.com/rails/rails/commit/0371317e253e4a3517e3e24a5803b60e64413f62. ActionView::PathSet no longer responds to unshift or push. We could copy the new implementation, but we've chosen to delegate to it instead. Co-authored-by: Iliana Hadzhiatanasova --- lib/rspec/rails/view_rendering.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rspec/rails/view_rendering.rb b/lib/rspec/rails/view_rendering.rb index 6651a0f59..feca67acb 100644 --- a/lib/rspec/rails/view_rendering.rb +++ b/lib/rspec/rails/view_rendering.rb @@ -127,11 +127,11 @@ def self.call(_template, _source = nil) # @private module EmptyTemplates def prepend_view_path(new_path) - lookup_context.view_paths.unshift(*_path_decorator(*new_path)) + super(_path_decorator(*new_path)) end def append_view_path(new_path) - lookup_context.view_paths.push(*_path_decorator(*new_path)) + super(_path_decorator(*new_path)) end private