class ActionView::TestCase::Behavior::RenderedViewsCollection

Public Class Methods

# File actionview/lib/action_view/test_case.rb, line 305
def initialize
  @rendered_views ||= Hash.new { |hash, key| hash[key] = [] }
end

Public Instance Methods

# File actionview/lib/action_view/test_case.rb, line 309
def add(view, locals)
  @rendered_views[view] ||= []
  @rendered_views[view] << locals
end
# File actionview/lib/action_view/test_case.rb, line 314
def locals_for(view)
  @rendered_views[view]
end
# File actionview/lib/action_view/test_case.rb, line 318
def rendered_views
  @rendered_views.keys
end
# File actionview/lib/action_view/test_case.rb, line 322
def view_rendered?(view, expected_locals)
  locals_for(view).any? do |actual_locals|
    expected_locals.all? { |key, value| value == actual_locals[key] }
  end
end