It would be nice to have a set_env method used internally by with_env such that you can use setup/teardown to set the env.