While it's probably okay to do this, it would be less manipulative to do something like:

ENV.should_receive(:HOME).and_return(nil)