RspecでENVをどうstubするのがよいのか - Qiita

TL;DR and_call_original使うallow(ENV).to receive(:[]).and_call_originalallow(ENV).to receive(:[]).w…