blob: 90eef0406aaf27e483d4f95b1cabeb3343d12c3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
require "test_helper"
class TestQuestion < Minitest::Test
def setup
@input = StringIO.new
@output = StringIO.new
@highline = HighLine.new(@input, @output)
@question = HighLine::Question.new("How are you?", nil)
@asker = HighLine::QuestionAsker.new(@question, @highline)
end
def test_ask_once
answer = "Very good, thanks for asking!"
@input.string = answer
assert_equal answer, @asker.ask_once
end
end
|