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:
parent
d06d4560a1
commit
f57968e329
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue