They do test the cap to see if it will hold pressure. Mine failed that too, but like you say, just buy a new one.
The evap test pressurizes the tank, fuel filler neck, vapor hoses going up to the engine from the tank, the charcoal canister and the canister purge valve. This is all to make sure gasoline fumes don't get out.
In my quest to get it fixed, I took it to a shop who said "Oh yeah, it's the filler neck hose, which rots out on all Rangers. You can't just replace the hose, you have to replace the whole filler neck. It costs $450+ just for the part from Ford"
Well, thanks for the diagnosis (free) and I took the truck home.
I went on eBay and found a place that sold the filler neck (probably made in China, maybe better quality than the original!) for $45 shipped.
It is sitting on my toolbox now, I hope to install it tonight (AllData says .6 hrs) and get the truck retested. Yay!