class RSpec::Rails::ViewRendering::EmptyTemplateResolver::ResolverDecorator

@private
templates with modified source
that return a collection of ‘ActionView::Template` instances, return
Delegates all methods to the submitted resolver and for all methods

def initialize(resolver)

def initialize(resolver)
  @resolver = resolver
end

def method_missing(name, *args, &block)

def method_missing(name, *args, &block)
  result = @resolver.send(name, *args, &block)
  nullify_templates(result)
end

def nullify_templates(collection)

def nullify_templates(collection)
  return collection unless collection.is_a?(Enumerable)
  return collection unless collection.all? { |element| element.is_a?(::ActionView::Template) }
  EmptyTemplateResolver.nullify_template_rendering(collection)
end