Allow `ask' action to customize choices prompt
This commit is contained in:
1 parent
7e062e06a1
commit
0d0ed541c8
4 files changed
+8
-8
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user