17 lines
488 B
Ruby
17 lines
488 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "stringio"
|
|
require_relative "test_helper"
|
|
|
|
class CLITest < Minitest::Test
|
|
def test_main_prompt_is_not_an_extra_choice
|
|
output = StringIO.new
|
|
cli = FeatherCaseWizard::CLI.new(ui: HighLine.new(StringIO.new("4\n"), output))
|
|
|
|
assert_equal 0, cli.run
|
|
assert_includes output.string, "What would you like to do:\n"
|
|
assert_includes output.string, "4. Exit\n"
|
|
refute_includes output.string, "5. What would you like to do?"
|
|
end
|
|
end
|