How to run serverspec tests against localhost using sudo for all commands?

493 views Asked by At

Serverspec automatically prepends sudo to every command when using SSH to execute the tests on a remote host. This works great, but I am looking to run my serverspec tests locally and many of my tests require sudo privileges. I am using RVM and bundler and I do not want to deal with installing serverspec and dependencies using sudo.

Why does serverspec not prepend sudo or at least give the option to use sudo when executing local tests? How can I force serverspec to use sudo for every command when running locally?

0

There are 0 answers