An Elephind search produces an instance of "spit a rat" from Muriel Pollexfen, "A King's Pardon," in the Adelaide [South Australia] Chronicle (June 7, 1918):
But O'Halloran's pockets were empty and his stomach craved the wherewithal to procure it a hearty meal and a comforting bottle of port. And, he argued aloud, if 'twas that he, Nicholas O'Halloran, highway man and night-rider these thirty years, should fed a sinking of the heart as he journeyed, was it not to be concluded without a doubt that the hearts of those five gallants would be as watery as the running dykes edging the soaking roads? Sure! Victory would be as easy as picking plums, and 'twould be himself was the coward and the fool if he gave up so certain a fight! Fight! Why, 'troth! 'twas not one of them could spit a rat even if they had the pluck to try!
The wording at first seems rather bizarre: why would the act of spitting a rat out of one's mouth strike anyone as representing a low bar for bravery—as opposed to, say, evidence of extreme and unhygienic eccentricity? But another instance of the phrase, from almost half a century earlier, offers some clarity. From James Grant, Six Years Ago: A Novel (1870):
... Adderfang opened his eyes, gasping heavily the while, and a terror came over him on seeing the point of Gordon's sword within an inch of his throat.
"Ach, Gott in himmel! Would you kill me, herr major?" he moaned.
"With as little compunction as I would would spit a rat," said Gordon sternly.
Here, "spit" clearly means "impale as if on a spit."
Similar early instances involve the variant phrase "spitting a rat." From an untitled item in the [Sydney, New South Wales] Evening News (February 13, 1871):
One of the late illustrations professing to give scenes "Inside Paris" represents the night guard on duty in the sewers, and one of them, with an expression of eager voracity, which is participated in by his envying companions, dexterously spitting a rat on the point of his bayonet, as the animal swims through the water. Such sketches as these may be some what exaggerated but no doubt they have a
broad basis of fact.
And from Edwin Pugh, "Borrowed Plumes," in Cassell's Magazine (July 1902):
"Liar! Coward!" exclaimed Gravely, stamping hard upon the ground. Persecutor of innocent women! Perjured slanderer! Fop! Fool! Villain! If you do not instantly draw your sword, by my forefather! I will run you through!And that with as little compunction as I should feel at spitting a rat!"
These examples raise the strong possibility that the 1918 instance, too, refers not to expectorating a rat from one's mouth but to impaling a rat with a sharp implement. Indeed, a search of the National Library of Australia's Trove database of old newspapers finds three instances of "spitted like a rat"—from the Adelaide [South Australia] Observer (February 10, 1883), the [Melbourne, Victoria] Age (October 24, 1896), and the [Adelaide, South Australia] Advertiser (October 3, 1914)—suggesting that the simile had a modest level of currency there in the half century from 1870 to 1920.
Obviously that is not a possible interpretation of the instance from Wolfert's 1943 novel (cited in Fumblefingers's answer); but, though improbable, it is not out of the question in the Adams example. Recent instances from 2001 (John Sandford, The Devil's Code) and 2008 (Kix Brooks & Ronnie Dunn, The Adventures of Slim & Howdy: A Novel) follow Adams in using the phrase as part of the lengthier notion of not trusting [someone] farther than [the speaker] could spit a rat.
Conclusion
In the period 1870–1920, the phrase "spit a rat" would probably have been understood to refer to impaling a rat on a spear, sword, bayonet, or other weapon; but from 1943 onward, the same phrase seems to have acquired the very different sense of expectorating a rat from one's mouth. The earlier act is easy to visualize as something that might happen in the real world; the latter appears to be an exaggerated act of great unpleasantness and no real-world possibility.