Skip to content

Commit 948021c

Browse files
eugeneiusilianah
authored andcommitted
Don't mutate ActionView::PathSet
Follows rails/rails@0371317. 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 <[email protected]>
1 parent b347d05 commit 948021c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rspec/rails/view_rendering.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ def self.call(_template, _source = nil)
119119
# @private
120120
module EmptyTemplates
121121
def prepend_view_path(new_path)
122-
lookup_context.view_paths.unshift(*_path_decorator(*new_path))
122+
super(_path_decorator(*new_path))
123123
end
124124

125125
def append_view_path(new_path)
126-
lookup_context.view_paths.push(*_path_decorator(*new_path))
126+
super(_path_decorator(*new_path))
127127
end
128128

129129
private

0 commit comments

Comments
 (0)