serverspec/serverspec — pull request #300 by fnichol (2013-11-26 18:38:06+00:00)
Title: [Backend::Exec] ensure no Ruby envvars are present when running command.

This should help better simulate invoking a non-interactive shell
command that is free of current Ruby environment variables such as
`GEM_HOME` and `GEM_PATH`.

If specific environment variables need to be set for the command to
succeed, then a pre_command can be used to prepare the command's
environment.

This will help other tools like Test Kitchen (via the busser-serverspec
runner plugin) to run Ruby programs such as 'chef-client' from an
Omnibus package installation without poluting/corrupting the gem
environment being passed on.

See test-kitchen/test-kitchen#242 for more gory details.