module RSpec::Rails::ViewRendering::EmptyTemplates

Used to null out view rendering in controller specs.

@private

Public Instance Methods

append_view_path(new_path) click to toggle source
# File lib/rspec/rails/view_rendering.rb, line 81
def append_view_path(new_path)
  lookup_context.view_paths.push(*_path_decorator(new_path))
end
prepend_view_path(new_path) click to toggle source
# File lib/rspec/rails/view_rendering.rb, line 77
def prepend_view_path(new_path)
  lookup_context.view_paths.unshift(*_path_decorator(new_path))
end

Private Instance Methods

_path_decorator(path) click to toggle source
# File lib/rspec/rails/view_rendering.rb, line 87
def _path_decorator(path)
  EmptyTemplatePathSetDecorator.new(ActionView::PathSet.new(Array.wrap(path)))
end