Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stub/mock for prompt::menu #3244

Open
genebean opened this issue Oct 12, 2023 · 0 comments
Open

Add stub/mock for prompt::menu #3244

genebean opened this issue Oct 12, 2023 · 0 comments
Labels
Feature New features and improvements.

Comments

@genebean
Copy link

Use Case

I have a plan with this block of code in it:

$menu = { 'y' => 'yes', 'n' => 'no' }
$selection = prompt::menu('Keep going?', $menu)

I want to be able to test this plan without having to dive under the hood of Bolt to figure out how to manually get the spec tests to not hang up when they reach the prompt::menu part.

I would also like to be able to test each option of the prompt.

Describe the Solution You Would Like

subs and mocks like exist for run_command() and the like.

@genebean genebean added the Feature New features and improvements. label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New features and improvements.
Projects
None yet
Development

No branches or pull requests

1 participant