Allow `ask' action to customize choices prompt

This commit is contained in:
Thibault Jouan
2014-01-21 01:19:17 +00:00
parent 7e062e06a1
commit 0d0ed541c8
4 changed files with 8 additions and 8 deletions

View File

@@ -4,9 +4,9 @@ Feature: `ask' recipe keyword
Given a recipe with:
"""
task :ask_letter do
letter = ask 'Which letter?', %w[A B]
letter = ask 'Which letter?', [[:a, ?A], [:b, ?B]]
echo letter
echo letter.inspect
end
"""
When I execute the recipe interactively
@@ -17,6 +17,6 @@ Feature: `ask' recipe keyword
0: A
1: B
Choice:
B
:b
"""
And the exit status must be 0