While I certainly don’t want to downplay the importance of employers following the law, one rule will keep employers out of trouble in most situations: be fair.
Did the employer gather all available information before making a decision? Did the employee know what was expected of him or her? Were the expectations reasonable? Was the employee given specific feedback and a chance to improve? Were like cases treated the same? Did the decision-maker have reason to be biased?
If you can show that the decision was fair, it’s often much easier to show that it was legal. If you can’t, it’s an uphill battle.