class ActionView::TestCase::Behavior::RenderedViewsCollection

def view_rendered?(view, expected_locals)

def view_rendered?(view, expected_locals)
  locals_for(view).any? do |actual_locals|
    expected_locals.all? { |key, value| value == actual_locals[key] }
  end
end