If your spouse's employer participates in a self-insured plan (usually only the case with very large employers), then the plan is covered by Federal law and not State law, in which case the employer can ignore the Massachusetts' law requiring eligibility of ex-spouses. This means that if your spouse's employer has a self-insured plan then no matter what the Court order states you will likely be terminated from your spouse's health insurance upon the divorce. At that time you will be eligible for COBRA, which is a program that allows for continuation of health insurance coverage for a set period of time so long as you pay 102% of the full premium.
If, however, your spouse's plan is not a self-insured plan then you will be eligible to continue coverage so long as you pay attention to the second factor, which is whether or not your Judgment of Divorce includes language requiring coverage. It is very important to consult with an attorney regarding the proper language to include in a Divorce Agreement to ensure that you will be eligible to continue to health insurance, if your spouse's employer allows for that option.
For more information on how to maintain or find health insurance after a divorce, check out this brochure prepared and distributed by the Massachusetts Attorney General's Office and Health Law Advocates entitled Staying Healthy: A Guide to Keeping Health Insurance After Divorce.