1. Both spouses are charged with a crime.
2. Spouse A wants to go to trial, while Spouse B offers to cut a deal, plead guilty to reduced charges, and testify against Spouse A.
3. At trial, the lawyer for Spouse A would make a motion to prevent Spouse B from testifying in the case, on the grounds that he/she was married to the defendant at the time the crime was allegedly committed.
4. Judge informs the prosecutor that Spouse B cannot testify, regardless of whether Spouse B is "cooperative" or not.
Of course, it would never get to that point because the prosecution would not cut the deal with Spouse B once they found out that the two were married.
(a) Criminal proceedings. In a criminal proceeding, a wife shall not be compelled to testify against her husband, nor a husband against his wife.
(b) Communications.
(1) Definition. A communication is confidential if it is made privately by any person to his or her spouse and is not intended for disclosure to any other person.
(2) General rule of privilege. An individual has a privilege during the person's life to refuse to testify or to prevent his or her spouse or former spouse from testifying as to any confidential communication made by the individual to the spouse during their marriage and to prevent another from disclosing any such confidential communication.
(3) Who may claim the privilege. The privilege may be claimed by the person who made the confidential communication, or by the person's guardian or conservator. The non-communicating spouse to whom the confidential communication was made is presumed to be authorized, during the life of the communicating spouse, to claim the privilege on behalf of the person who made the confidential communication.
The rest of the law can be read here. Rule 502 Husband-Wife