diff --git a/lib/console1984/input_output.rb b/lib/console1984/input_output.rb index 2538275..366071d 100644 --- a/lib/console1984/input_output.rb +++ b/lib/console1984/input_output.rb @@ -31,7 +31,7 @@ def show_warning(message) def ask_for_value(message) puts Rainbow("#{message}").green - reason = $stdin.gets.strip until reason.present? + reason = Reline.readline.strip until reason.present? reason end end diff --git a/test/support/io_stream_test_helper.rb b/test/support/io_stream_test_helper.rb index e6f15e6..d06ff1b 100644 --- a/test/support/io_stream_test_helper.rb +++ b/test/support/io_stream_test_helper.rb @@ -1,5 +1,5 @@ module IoStreamTestHelper def type_when_prompted(*list, &block) - $stdin.stub(:gets, proc { list.shift }, &block) + Reline.stub(:readline, proc { list.shift }, &block) end end