Not really, they were good heavy infantry, but not exceptional.
I have to say, the comments on the Spartans really aren't fair.
Back at the times of the Persian Wars, heavy infantry was pretty much everything. Heavy/light Cavalry, light troops, and archers and other missile throwers evolved later, much later and only at Philip and Alexander's time did the heavy phalanx really become yet another factor on the battlefield equal to light infantry and etc. I've seen a map of the battle of Marathoon, it's pretty much heavy phalanxes against each other.
And even only a few years earlier than Alexander's time, during Theban supremacy, the phalanx was important (it was the revolutionary Theban tactic of one weighted wing poised with a deep -50 rows- phalanx waiting to throw the main punch while light troops pinned down the other wing. Philip/Alexander even emulated this a bit by deepening their phalanxes, though not by much).
Also, the Greeks were definetly not some rabble. Emulatewd by the rest of the Med., they trained a lot for the important task of heavy phalanxes and citizen armies appeared with the development of light troops. You could call this rabble, perhaps, but it took skill to throw missiles, especially like the Balearicians and Rhodians.
Early Roman armies had good discipline. At least by Pyrrhus. They also took up military development quite quickly. It was more after the reforms post-Pyrrhus that they grew strong, modifying their phalanx.
However, I'm more of an expert on stuff after the Persian War, but still, Sparta was a major power with good heavy phalanxes. It even kept this power right up till the Thebans came and destroyed their power.