diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-24 11:01:41 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-24 13:58:52 -0300 |
commit | 91c6366c376d3d8c00e3784553f2036d79adb902 (patch) | |
tree | d2f017d25e576330fac88b2235c387ac6a67dcde /test | |
parent | f63308fdf593173291e5e553340e5aae21b35670 (diff) | |
download | highline-91c6366c376d3d8c00e3784553f2036d79adb902.tar.gz |
Tests were not checking HighLine class. But an instance.
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_highline.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_highline.rb b/test/test_highline.rb index 5294009..8458138 100755 --- a/test/test_highline.rb +++ b/test/test_highline.rb @@ -502,9 +502,11 @@ class TestHighLine < Minitest::Test # turn off color old_setting = HighLine.use_color? HighLine.use_color = false + @terminal.use_color = false @terminal.say("This should be <%= color('cyan', CYAN) %>!") assert_equal("This should be cyan!\n", @output.string) HighLine.use_color = old_setting + @terminal.use_color = old_setting end def test_color_setting_per_instance @@ -517,6 +519,7 @@ class TestHighLine < Minitest::Test # Testing with both use_color setted to true HighLine.use_color = true + @terminal.use_color = true cli.use_color = true @terminal.say("This should be <%= color('cyan', CYAN) %>!") @@ -530,6 +533,7 @@ class TestHighLine < Minitest::Test # Testing with both use_color setted to false HighLine.use_color = false + @terminal.use_color = false cli.use_color = false @terminal.say("This should be <%= color('cyan', CYAN) %>!") @@ -545,6 +549,7 @@ class TestHighLine < Minitest::Test # Class false, instance true HighLine.use_color = false + @terminal.use_color = false cli.use_color = true @terminal.say("This should be <%= color('cyan', CYAN) %>!") @@ -558,6 +563,7 @@ class TestHighLine < Minitest::Test # Class true, instance false HighLine.use_color = true + @terminal.use_color = true cli.use_color = false @terminal.say("This should be <%= color('cyan', CYAN) %>!") @@ -570,6 +576,7 @@ class TestHighLine < Minitest::Test cli_output.truncate(cli_output.rewind) HighLine.use_color = old_setting + @terminal.use_color = old_setting end def test_uncolor |