How much will it cost to throw parts at it and still fail? You want to fly blind? OK...change your plugs and wires, replace the cat and O2 sensor, check to make sure the EFI system is in closed loop (with a midpoint O2 sensor voltage of 450 millivolts), the EVAP and EGR systems are working, change the oil, set timing, and drive it on the highway for 15 minutes just before you go in.
You don't want to look at smog testing as an epic struggle. The bottom line is the engine will easily pass if it's in good condition and the emission control systems are working. Best to do as jdub suggests and educate yourself about this stuff. That way you won't be needlessly replacing things. Start with the TSRM and go from there. None of this guarantees you'll pass though. It'll always be a crap shoot unless you have access to a gas analyzer when doing the repairs.
Or apply for the Maryland waiver after spending $450. The problem with that is it'll still be running poorly and screwing up your engine. There are consequences to a rich mixture other than pollution you know. Engine deposits, oil contamination, posioning of the cat, etc. This is why, once it's fixed, you need to stay on top of things.