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

Defined in:
lib/action_view/test_case.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rendered_viewsObject

Returns the value of attribute rendered_views.



336
337
338
# File 'lib/action_view/test_case.rb', line 336

def rendered_views
  @rendered_views
end

Instance Method Details

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



338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/action_view/test_case.rb', line 338

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