In television and movies, the insanity defense is quite popular. The ability to write drama -- particularly in a court setting -- around the insanity defense makes it a favorite of film and show creators. In real life, however, there is less drama and more procedure involved in proving an insanity defense.
In most cases, courts use one or more of four procedures to test an insanity defense. The first test is called the M'Naghten Rule. It tests whether a defendant had a mental illness that caused him or her to be unable to distinguish whether a criminal act was right or wrong. It also tests whether the mental illness caused the defendant to be unaware of what he or she was doing at the time of the criminal activity.
In some cases, a defendant might be aware of his or her actions but be unable to stop them because of a mental illness. The court uses the Irresistible Impulse test to find out if this might be the case. A third test, known as the Durham Rule, helps show whether the defendant committed a criminal act because of a mental defect, even if no mental illness diagnosis is present.
A fourth test, known as the Model Penal Code Test for Legal Insanity, helps show whether the defendant failed to understand that an act was criminal or was unable, because of a mental illness, to act according to the law. This and the other three tests usually involve an evaluation and testimony by one or more mental health experts regarding the defendant's psychological and health state and history.
Source: FindLaw, "Insanity Defense," accessed July 10, 2015