In The Crucible at the end of the play, Danforth questions John Proctor intensely. He wants John Proctor to declare his guilt for a variety of reasons. When John Proctor says he will confess, Danforth is thrilled, but when it comes down to writing it down on paper, Proctor refuses to blemish his name that way.
Danforth asks many questions similar to "have you ever been a witch" including:
"Have you seen the devil in your life"
"Did you bind yourself to the devil's service" and
"Did you ever see anyone with the devil"
Proctor answers yes to the first two quesitons for his confession, but refuses to indict anyone else on the third question. He says he will only confess of his own crimes. Proctor then must sign the document which he refuses. Proctor finally tears up the paper and goes to the gallows to be hanged. He cannot falsely confess afterall.
This can be found at the end of Act 2 scene 3 in the last lines of the play.