There's actually a nice `stub_env` helper that I wrote. The problem with stubbing ENV is that you need to stub a default value. The helper takes care of that for you.