All other unit tests pass.
This one fails because the expectation is to see only the prompt, when it reality, it sees the prompt and the input it types.
Code Run
io= capture_io("1\n", fn > RPG.CharacterSheet.ask_level() end)
assert io == "What is your character's level?\n"
TEST FAILURE
test ask_level/O it prints a prompt (RPG. CharacterSheetTest)
test/rpg/character_sheet_test.exs:49
Assertion with == failed
code: assert io == "What is your character's level?\n"
left: "What is your character's level?\n\"1\\n\"\n"
right: "What is your character's level?\n"
stacktrace:
test/rpg/character_sheet_test.exs:52: (test)
Surely this is a bug in the test case? It should either include the expectation of what it types or test only the leftmost characters in the string.