Initial parametric Feather case generator
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "stringio"
|
||||
require_relative "test_helper"
|
||||
|
||||
class WizardTest < Minitest::Test
|
||||
def test_minimal_new_case_flow_and_confirmation
|
||||
input = StringIO.new(
|
||||
"Demo Case\n" \
|
||||
"\n" \
|
||||
"1\n" \
|
||||
"1\n" \
|
||||
"\n" \
|
||||
"n\n" \
|
||||
"n\n" \
|
||||
"n\n" \
|
||||
"1\n" \
|
||||
"n\n" \
|
||||
"n\n" \
|
||||
"n\n" \
|
||||
"n\n" \
|
||||
"y\n"
|
||||
)
|
||||
output = StringIO.new
|
||||
wizard = FeatherCaseWizard::Wizard.new(ui: HighLine.new(input, output))
|
||||
|
||||
config = wizard.create
|
||||
|
||||
assert wizard.confirm_build(config)
|
||||
assert_equal "demo-case", config.slug
|
||||
assert_equal ["3mf"], config.outputs["formats"]
|
||||
assert_equal %w[body lid], config.printable_parts
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user