diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 14:49:57 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 14:49:57 -0300 |
commit | d4f68a18238bd4f4abb4674bd85abffa70c38e55 (patch) | |
tree | adc672cb99b69455f5ffc23ddf4713382f93e720 | |
parent | 68f0b74b7feb4067e34c188345b94882ff5431bc (diff) | |
download | highline-d4f68a18238bd4f4abb4674bd85abffa70c38e55.tar.gz |
Fix test_or_ask
-rw-r--r-- | test/test_import.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_import.rb b/test/test_import.rb index 3ec2da8..d8526d7 100644 --- a/test/test_import.rb +++ b/test/test_import.rb @@ -22,11 +22,11 @@ class TestImport < Minitest::Test end def test_or_ask - old_terminal = $terminal + old_instance = HighLine.default_instance input = StringIO.new output = StringIO.new - $terminal = HighLine.new(input, output) + HighLine.default_instance = HighLine.new(input, output) input << "10\n" input.rewind @@ -40,7 +40,7 @@ class TestImport < Minitest::Test assert_equal(10, 20.or_ask("How much? ", Integer) { |q| q.in = 1..10 }) ensure - $terminal = old_terminal + HighLine.default_instance = old_instance end def test_redirection |