123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Rails::ViewRendering::EmptyTemplateResolver Private

Do not use. This class is for internal use only.
Relationships & Source Files
Namespace Children
Classes:
Inherits: Object
Defined in: rspec-rails/lib/rspec/rails/view_rendering.rb

Class Method Summary

Class Method Details

.build(path)

[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/view_rendering.rb', line 44

def self.build(path)
  if path.is_a?(::ActionView::Resolver)
    ResolverDecorator.new(path)
  else
    FileSystemResolver.new(path)
  end
end

.nullify_template_rendering(templates)

[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/view_rendering.rb', line 52

def self.nullify_template_rendering(templates)
  templates.map do |template|
    ::ActionView::Template.new(
      "",
      template.identifier,
      EmptyTemplateHandler,
      virtual_path: template.virtual_path,
      format: template_format(template),
      locals: []
    )
  end
end

.template_format(template)

[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/view_rendering.rb', line 65

def self.template_format(template)
  template.format
end