In M2TW it doesn't work by default, but you can help it by running the unit that is already engaged in combat through the opposing unit (you'll lose a few men that way however) and then click attack. Usually use this most in city battles.