From d4f68a18238bd4f4abb4674bd85abffa70c38e55 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Thu, 29 Jun 2017 14:49:57 -0300 Subject: Fix test_or_ask --- test/test_import.rb | 6 +++--- 1 file 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 -- cgit v1.2.1