Which is stupid. If she's more qualified than someone else, but she's going to leave you in a month, you still have to hire her?
Well, this situation is getting into a highly unlikely scenario. How many 8 month pregnant women are out looking for jobs? That's got to be a pretty small number. And out of those how many of them just happen to be the most qualified of all the candidates? Now the numbers are dropping even further.
If if she did fit that scenario but was passed over because of pregnancy, how would she even know that? Typically if you interview for a job and you don't get it, you get a letter of phone call later telling you that you didn't get the job, no reason is typically offered.
Proving hiring descrimination (for any reason) is almost impossible. The main focus of this law is to prevent people from being fired solely for getting pregnant or to be paid less because they may become pregnant.