aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation/delegation_test.rb
diff options
context:
space:
mode:
authorFederico Ravasio <ravasio.federico@gmail.com>2013-10-07 10:15:23 +0200
committerFederico Ravasio <ravasio.federico@gmail.com>2013-10-07 10:15:23 +0200
commitafd0a8ab5f690b9bcc5f49371abd82d41a364f58 (patch)
tree47edbc7b5852683c84dc699642a2c560464bfba1 /activerecord/test/cases/relation/delegation_test.rb
parent21a71cd5d8f266252278a63316a99cc403a32cad (diff)
downloadrails-afd0a8ab5f690b9bcc5f49371abd82d41a364f58.tar.gz
rails-afd0a8ab5f690b9bcc5f49371abd82d41a364f58.tar.bz2
rails-afd0a8ab5f690b9bcc5f49371abd82d41a364f58.zip
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.
Diffstat (limited to 'activerecord/test/cases/relation/delegation_test.rb')
0 files changed, 0 insertions, 0 deletions