123456789_123456789_123456789_123456789_123456789_

Module: ActionView::TestCase::Behavior::Locals

Relationships & Source Files
Defined in: actionview/lib/action_view/test_case.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#rendered_views (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/test_case.rb', line 192

attr_accessor :rendered_views

Instance Method Details

#render(options = {}, local_assigns = {})

[ GitHub ]

  
# File 'actionview/lib/action_view/test_case.rb', line 194

def render(options = {}, local_assigns = {})
  case options
  when Hash
    if block_given?
      rendered_views.add options[:layout], options[:locals]
    elsif options.key?(:partial)
      rendered_views.add options[:partial], options[:locals]
    end
  else
    rendered_views.add options, local_assigns
  end

  super
end