Grounds to Contest
In the United States, a person is generally free to name anyone as beneficiary under her will. No laws require that a spouse or children inherit. On the other hand, you can contest the will, if it was not signed before the required number of witnesses, if the testator was incompetent when she made it, or if it was made as a result of undue influence or fraud.
Time to Contest
States set up time limits for bringing actions in court, termed statutes of limitations. The statute of limitations for bringing a will contest varies among the states. In Pennsylvania, for example, you have at most one year from the date the probate court officially appoints an executor, but the court also has discretion to set a shorter period. In Texas, you have two years to bring the contest and the time begins to run when the will is admitted to probate. In some cases, the limitations period may be waived in case of fraud or improper notice.