Skip to content

Commit c4e02b8

Browse files
committed
Fix: Nullify templates found with custom resolvers
1 parent c2b6b14 commit c4e02b8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/rspec/rails/view_rendering.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,13 @@ def method_missing(name, *args, &block)
7474
@resolver.send(name, *args, &block)
7575
end
7676

77-
private
77+
def find_all(name, prefix = nil, partial = false, details = {}, _key = nil, _locals = []) # rubocop:disable Style/ParameterLists
78+
templates = find_templates(name, prefix, partial, details)
79+
EmptyTemplateResolver.nullify_template_rendering(templates)
80+
end
7881

79-
def find_templates(*args)
80-
templates = @resolver.find_templates(*args)
82+
def find_all_anywhere(name, prefix, partial = false, details = {}, _key = nil, _locals = []) # rubocop:disable Style/ParameterLists
83+
templates = find_templates(name, prefix, partial, details, true)
8184
EmptyTemplateResolver.nullify_template_rendering(templates)
8285
end
8386
end

0 commit comments

Comments
 (0)