Skip to content

Commit 78fb6ca

Browse files
fix: Remove argumentError doctest
Attempted to run the original code, and tried this as well but the argument error is still propagated to the livebook, and kills compilation. ```elixir iex> assert_raise ArgumentError, fn -> %Character{} end :ok ```
1 parent b5ae5cf commit 78fb6ca

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

exercises/rpg_dialogue.livemd

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,10 @@ defmodule Character do
9090
9191
Defines a character struct, and functions for creating character dialogue.
9292
93-
iex> %Character{name: "Frodo"}
94-
%Character{name: "Frodo", weapon: nil, class: nil}
93+
iex> %Character{name: "Frodo", weapon: "Sting"}
94+
%Character{name: "Frodo", weapon: "String", class: nil}
9595
96-
The :name key is required.
97-
98-
iex> %Character{name: "Frodo"}
99-
** (ArgumentError) the following keys must also be given when building struct Character: [:name]
96+
The :name key is required. But cannot be tested by doctests
10097
"""
10198
defstruct []
10299

0 commit comments

Comments
 (0)