For a vegetarian version of this soup, substitute Homemade Vegetable Stock for the chicken stock.
Place beans in a large bowl, and cover with water. Let soak overnight, and drain.
Cut a 7-inch square of cheesecloth. Place 1 rosemary sprig at one end, and roll, enclosing sprig; secure with kitchen twine. Place beans, wrapped rosemary, onion, and 6 cups water in a large saucepan. Bring to a boil over medium-high heat. Reduce heat to a simmer, and cook until beans are just tender, about 25 minutes. Drain beans in a colander. Discard onion and rosemary; set beans aside.
Heat oven to 425 degrees. Wrap garlic in aluminum foil. Cook until soft, about 40 minutes. Remove garlic from oven, and allow to cool. Slice garlic in half crosswise, and squeeze, removing cloves; set cloves aside.
Bring a large stockpot of salted water to a boil over high heat. Add tubetti, and cook until al dente, about 8 minutes. Transfer to a colander, drain, and set aside.
Place a 6-quart low-sided saucepan over medium heat. Add olive oil; heat until oil is hot but not smoking. Add leeks, remaining sprig rosemary, and roasted garlic cloves. Cook until leeks become translucent. Add sweet potato; cook, stirring until the potato pieces just begin to soften, about 8 minutes.
Add kale; cook until kale begins to wilt, about 4 minutes. Add stock; cook until potato pieces are tender, about 10 minutes. Add reserved beans, pasta, 1/2 teaspoon salt, and pepper. Cook until heated through, about 5 minutes. Divide among six plates; serve.