Class: RSpec::Rails::ViewRendering::PathSetDelegatorResolver
- Inherits:
-
ActionView::Resolver
- Object
- ActionView::Resolver
- RSpec::Rails::ViewRendering::PathSetDelegatorResolver
- 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
-
#path_set ⇒ Object
readonly
Returns the value of attribute path_set.
Instance Method Summary collapse
- #find_all(*args) ⇒ Object
-
#initialize(path_set) ⇒ PathSetDelegatorResolver
constructor
A new instance of PathSetDelegatorResolver.
Constructor Details
#initialize(path_set) ⇒ PathSetDelegatorResolver
Returns a new instance of PathSetDelegatorResolver.
39 40 41 |
# File 'lib/rspec/rails/view_rendering.rb', line 39 def initialize(path_set) @path_set = path_set end |
Instance Attribute Details
#path_set ⇒ Object (readonly)
Returns the value of attribute path_set.
37 38 39 |
# File 'lib/rspec/rails/view_rendering.rb', line 37 def path_set @path_set end |
Instance Method Details
#find_all(*args) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rspec/rails/view_rendering.rb', line 43 def find_all(*args) 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 |