"Especially sudo with all the magic that goes behind executing a process as another user."
Your last sentence kills your standpoint totally.
Please check out the mentioned "toft". It's lxc inside vagrant and designed to test complex infrastructure code from the outside in. Nothing web related.
Enough with the nonsense. TDD is great for some tools, in some situations. It's not a "solve all". And now comes "ATDD", people should start working instead on inventing acronyms.
vagrant? really, REALLY?
Try QEMU. Try chroot
News flash, sudo is not a RoR application. Especially sudo with all the magic that goes behind executing a process as another user.