permafrost (rubygems): Environment variables are a standard way for configuring applications in production. It allows for quickly changing the configuration, and avoids having to introduce secrets in the code.  When testing code that relies on environment variables, it becomes problematic to mock the environment, and even more to clean up afterwards.  Permafrost allows you to define a limited scope where the environment is set as you decide, returning it to its original state afterwards. 
Keywords: environment-variables|ruby|testing