Globally including `TaskHelpers` in `TestEnv` blocks Pry
This line, added in 532ad2e5, is currently blocking binding.pry
from being used in tests.
The task globally includes Gitlab::TaskHelpers
, which defines prompt
, which pry uses, resulting in the following error:
Failure/Error:
def prompt(message, choices = nil)
begin
print(message)
answer = STDIN.gets.chomp
end while choices.present? && !choices.include?(answer)
answer
ArgumentError:
wrong number of arguments (given 0, expected 1..2)
# ./lib/tasks/gitlab/task_helpers.rb:45:in `prompt'
# ./lib/banzai/filter/sanitization_filter.rb:92:in `block in allow_table_alignment'
# ./spec/support/filter_spec_helper.rb:21:in `filter'
# ./spec/lib/banzai/filter/sanitization_filter_spec.rb:74:in `block (3 levels) in <top (required)>'
# -e:1:in `<main>'
We should avoid including this globally if we can, but if not, we should rename the method to something like task_prompt
.
cc @rymai