Class: RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator
- Inherits:
-
ActionView::Resolver
- Object
- ActionView::Resolver
- RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator
- Defined in:
- lib/rspec/rails/view_rendering.rb
Overview
Delegates find_all to the submitted path set and then returns templates with modified source
Instance Attribute Summary collapse
-
#original_path_set ⇒ Object
readonly
Returns the value of attribute original_path_set.
Instance Method Summary collapse
- #find_all(*args) ⇒ Object private
-
#initialize(original_path_set) ⇒ EmptyTemplatePathSetDecorator
constructor
A new instance of EmptyTemplatePathSetDecorator.
Constructor Details
#initialize(original_path_set) ⇒ EmptyTemplatePathSetDecorator
Returns a new instance of EmptyTemplatePathSetDecorator.
64 65 66 |
# File 'lib/rspec/rails/view_rendering.rb', line 64 def initialize(original_path_set) @original_path_set = original_path_set end |
Instance Attribute Details
#original_path_set ⇒ Object (readonly)
Returns the value of attribute original_path_set.
62 63 64 |
# File 'lib/rspec/rails/view_rendering.rb', line 62 def original_path_set @original_path_set end |
Instance Method Details
#find_all(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/rspec/rails/view_rendering.rb', line 69 def find_all(*args) original_path_set.find_all(*args).collect do |template| ::ActionView::Template.new( "", template.identifier, template.handler, { :virtual_path => template.virtual_path, :format => template.formats } ) end end |