Just change ENV and restore it afterwards.
Just change ENV and restore it afterwards.

Stubbing ENV[] is not safe outside MRI. At some point after the
stubbing has occurred a backtrace is printed to the ActiveSupport
warning log: there Rubinius accesses ENV['RBX_NOCOLOR'] to determine
if it should print the backtrace with colors or not, causing the
stub to fail. Other implementations might access ENV in a different
way too, we just can't predict it.
The only thing we can do here is to actually set the ENV with what
we want and restore it afterwards.

utilum/rails,lcreid/rails,matrinox/rails,odedniv/rails,BlakeWilliams/rails,illacceptanything/illacceptanything,Vasfed/rails,illacceptanything/illacceptanything,travisofthenorth/rails,iainbeeston/rails,yahonda/rails,arunagw/rails,kirs/rails-1,deraru/rails,vassilevsky/rails,maicher/rails,yawboakye/rails,rbhitchcock/rails,arjes/rails,schuetzm/rails,aditya-kapoor/rails,illacceptanything/illacceptanything,eileencodes/rails,tijwelch/rails,gfvcastro/rails,ttanimichi/rails,ngpestelos/rails,bolek/rails,marklocklear/rails,elfassy/rails,untidy-hair/rails,yawboakye/rails,lcreid/rails,voray/rails,illacceptanything/illacceptanything,pvalena/rails,amoody2108/TechForJustice,Vasfed/rails,arunagw/rails,Envek/rails,bogdanvlviv/rails,deraru/rails,Erol/rails,georgeclaghorn/rails,pschambacher/rails,yalab/rails,koic/rails,maicher/rails,kddeisz/rails,iainbeeston/rails,riseshia/railsguides.kr,felipecvo/rails,shioyama/rails,kenta-s/rails,coreyward/rails,rails/rails,richseviora/rails,jeremy/rails,Edouard-chin/rails,eileencodes/rails,mtsmfm/rails,yawboakye/rails,gauravtiwari/rails,voray/rails,untidy-hair/rails,stefanmb/rails,koic/rails,flanger001/rails,lucasmazza/rails,vassilevsky/rails,Erol/rails,travisofthenorth/rails,printercu/rails,Vasfed/rails,illacceptanything/illacceptanything,mechanicles/rails,bogdanvlviv/rails,palkan/rails,Erol/rails,jeremy/rails,arjes/rails,mohitnatoo/rails,schuetzm/rails,ttanimichi/rails,richseviora/rails,EmmaB/rails-1,bogdanvlviv/rails,ngpestelos/rails,Envek/rails,mohitnatoo/rails,utilum/rails,alecspopa/rails,kirs/rails-1,pvalena/rails,esparta/rails,sealocal/rails,felipecvo/rails,lcreid/rails,untidy-hair/rails,flanger001/rails,Edouard-chin/rails,88rabbit/newRails,BlakeWilliams/rails,Stellenticket/rails,brchristian/rails,tijwelch/rails,printercu/rails,illacceptanything/illacceptanything,schuetzm/rails,pschambacher/rails,aditya-kapoor/rails,repinel/rails,repinel/rails,yasslab/railsguides.jp,rossta/rails,kamipo/rails,arunagw/rails,rails/rails,kmayer/rails,mathieujobin/reduced-rails-for-travis,iainbeeston/rails,MSP-Greg/rails,assain/rails,alecspopa/rails,MSP-Greg/rails,illacceptanything/illacceptanything,brchristian/rails,riseshia/railsguides.kr,baerjam/rails,deraru/rails,illacceptanything/illacceptanything,kirs/rails-1,rafaelfranca/omg-rails,illacceptanything/illacceptanything,kaspth/rails,mtsmfm/railstest,samphilipd/rails,yahonda/rails,kmayer/rails,xlymian/rails,mtsmfm/rails,kmayer/rails,Edouard-chin/rails,shioyama/rails,shioyama/rails,prathamesh-sonpatki/rails,kaspth/rails,vipulnsward/rails,MSP-Greg/rails,jeremy/rails,printercu/rails,matrinox/rails,illacceptanything/illacceptanything,georgeclaghorn/rails,kachick/rails,eileencodes/rails,Sen-Zhang/rails,tgxworld/rails,assain/rails,yhirano55/rails,eileencodes/rails,mijoharas/rails,tjschuck/rails,starknx/rails,brchristian/rails,kmcphillips/rails,aditya-kapoor/rails,MichaelSp/rails,baerjam/rails,gavingmiller/rails,bradleypriest/rails,joonyou/rails,yasslab/railsguides.jp,Stellenticket/rails,joonyou/rails,bradleypriest/rails,tijwelch/rails,samphilipd/rails,yasslab/railsguides.jp,untidy-hair/rails,pvalena/rails,esparta/rails,notapatch/rails,travisofthenorth/rails,Edouard-chin/rails,kenta-s/rails,gfvcastro/rails,illacceptanything/illacceptanything,yhirano55/rails,illacceptanything/illacceptanything,kmcphillips/rails,starknx/rails,mtsmfm/rails,tjschuck/rails,felipecvo/rails,rafaelfranca/omg-rails,ttanimichi/rails,hanystudy/rails,BlakeWilliams/rails,joonyou/rails,gavingmiller/rails,odedniv/rails,palkan/rails,yalab/rails,88rabbit/newRails,mohitnatoo/rails,baerjam/rails,tjschuck/rails,palkan/rails,hanystudy/rails,hanystudy/rails,vassilevsky/rails,sergey-alekseev/rails,vipulnsward/rails,gavingmiller/rails,elfassy/rails,amoody2108/TechForJustice,fabianoleittes/rails,bolek/rails,lcreid/rails,koic/rails,MichaelSp/rails,illacceptanything/illacceptanything,gfvcastro/rails,mijoharas/rails,samphilipd/rails,88rabbit/newRails,kamipo/rails,illacceptanything/illacceptanything,Sen-Zhang/rails,georgeclaghorn/rails,baerjam/rails,BlakeWilliams/rails,amoody2108/TechForJustice,shioyama/rails,marklocklear/rails,kachick/rails,notapatch/rails,mohitnatoo/rails,vipulnsward/rails,ledestin/rails,kddeisz/rails,kachick/rails,esparta/rails,jeremy/rails,riseshia/railsguides.kr,esparta/rails,gcourtemanche/rails,gauravtiwari/rails,mtsmfm/railstest,tjschuck/rails,elfassy/rails,Sen-Zhang/rails,Spin42/rails,MSP-Greg/rails,MichaelSp/rails,bogdanvlviv/rails,joonyou/rails,betesh/rails,arjes/rails,Stellenticket/rails,betesh/rails,Erol/rails,mechanicles/rails,mathieujobin/reduced-rails-for-travis,tgxworld/rails,arunagw/rails,flanger001/rails,yhirano55/rails,illacceptanything/illacceptanything,gfvcastro/rails,coreyward/rails,marklocklear/rails,notapatch/rails,vipulnsward/rails,iainbeeston/rails,mathieujobin/reduced-rails-for-travis,kmcphillips/rails,gcourtemanche/rails,repinel/rails,aditya-kapoor/rails,alecspopa/rails,maicher/rails,ledestin/rails,lucasmazza/rails,deraru/rails,yawboakye/rails,rails/rails,ledestin/rails,Stellenticket/rails,travisofthenorth/rails,kaspth/rails,starknx/rails,coreyward/rails,richseviora/rails,fabianoleittes/rails,riseshia/railsguides.kr,betesh/rails,yasslab/railsguides.jp,kddeisz/rails,stefanmb/rails,mijoharas/rails,georgeclaghorn/rails,assain/rails,betesh/rails,mtsmfm/railstest,EmmaB/rails-1,xlymian/rails,rafaelfranca/omg-rails,notapatch/rails,Envek/rails,Envek/rails,prathamesh-sonpatki/rails,schuetzm/rails,Spin42/rails,yhirano55/rails,flanger001/rails,bolek/rails,matrinox/rails,xlymian/rails,lucasmazza/rails,sealocal/rails,mechanicles/rails,repinel/rails,prathamesh-sonpatki/rails,rails/rails,palkan/rails,ngpestelos/rails,pschambacher/rails,sergey-alekseev/rails,mechanicles/rails,prathamesh-sonpatki/rails,kddeisz/rails,gcourtemanche/rails,fabianoleittes/rails,tgxworld/rails,sergey-alekseev/rails,Spin42/rails,assain/rails,utilum/rails,kamipo/rails,fabianoleittes/rails,printercu/rails,Vasfed/rails,odedniv/rails,rbhitchcock/rails,pvalena/rails,sealocal/rails,kenta-s/rails,stefanmb/rails,bradleypriest/rails,yalab/rails,kmcphillips/rails,rossta/rails,tgxworld/rails,yahonda/rails,voray/rails,utilum/rails,gauravtiwari/rails,yalab/rails,EmmaB/rails-1,rbhitchcock/rails,rossta/rails,yahonda/rails