Cook the pasta according to the package directions. Meanwhile, heat the oil in a small skillet over medium-high heat. Add the garlic and cook 1 minute. Add the tomatoes and beans and cook, stirring occasionally, until heated through, about 3 minutes. Add the cooked pasta. Remove from heat and stir in the Parmesan.