The plea of not guilty is a denial of every material allegation in the indictment, and all matters of fact tending to establish a defense, other than a former conviction or acquittal, may be given in evidence under such plea.