Skip to content

Commit

Permalink
Use helpers for confirm_keys DSL test
Browse files Browse the repository at this point in the history
  • Loading branch information
Geekfish committed Aug 20, 2021
1 parent d42efff commit 9dea17b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions spec/unit/select_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,9 @@ def exit_message(prompt, choice)
end
expect(value).to eq("Large")
expect(prompt.output.string).to eq([
"\e[?25lWhat size? \e[90m(Press #{up_down} arrow to move and Ctrl+S to select)\e[0m\n",
"\e[32m#{symbols[:marker]} Large\e[0m\n",
" Medium\n",
" Small",
"\e[2K\e[1G\e[1A" * 3,
"\e[2K\e[1G",
"What size? \e[32mLarge\e[0m\n\e[?25h"
output_helper("What size?", choices, "Large", init: true,
hint: "Press #{up_down} arrow to move and Ctrl+S to select"),
exit_message("What size?", "Large")
].join)
end

Expand Down

0 comments on commit 9dea17b

Please sign in to comment.