diff options
Diffstat (limited to 'test/acceptance/at_readline_agree.rb')
-rw-r--r-- | test/acceptance/at_readline_agree.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/acceptance/at_readline_agree.rb b/test/acceptance/at_readline_agree.rb new file mode 100644 index 0000000..0a94180 --- /dev/null +++ b/test/acceptance/at_readline_agree.rb @@ -0,0 +1,18 @@ +# coding: utf-8 + +require_relative "acceptance_test" + +HighLine::AcceptanceTest.check do |t| + t.desc = + "This step checks if the readline works well with agree.\n" \ + "You should press <tab> and readline should give the default " \ + "(yes/no) options to autocomplete." + + t.action = proc do + answer = agree("Do you agree?") { |q| q.readline = true } + puts "You've entered -> #{answer} <-" + end + + t.question = + "Did HighLine#agree worked well using question.readline = true (y/n)? " +end |