1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Set USE_COLORIZE to the default value in a test

This commit is contained in:
aycabta 2021-05-24 12:13:46 +09:00
parent d06d4560a1
commit f57968e329

View file

@ -68,7 +68,9 @@ module TestIRB
end
def test_no_color_environment_variable
orig = ENV['NO_COLOR']
orig_no_color = ENV['NO_COLOR']
orig_use_colorize = IRB.conf[:USE_COLORIZE]
IRB.conf[:USE_COLORIZE] = true
assert IRB.conf[:USE_COLORIZE]
@ -80,7 +82,8 @@ module TestIRB
IRB.setup(__FILE__)
assert IRB.conf[:USE_COLORIZE]
ensure
ENV['NO_COLOR'] = orig
ENV['NO_COLOR'] = orig_no_color
IRB.conf[:USE_COLORIZE] = orig_use_colorize
end
private