Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove argumentError doctest #1057

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

jonathanstiansen
Copy link
Contributor

First, the test itself should work because the character has a :name, so I can't get that test to "pass". When changing it so it does throw an error, the whole liveview process throws an error:

image

Options I attempted:

  1. I tried the original with no name passed to the struct
  2. I tried using assert_raise with the third param, including the message but isn't required and made the test long (and still failed)
  3. I tried to use assert_raise as well but the argument error is still propagated to the livebook, and kills compilation.
  iex> assert_raise ArgumentError, fn -> %Character{} end
  :ok

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
```
@BrooklinJazz BrooklinJazz merged commit 5f5f4e1 into DockYard-Academy:main Apr 15, 2024
0 of 2 checks passed
@BrooklinJazz
Copy link
Collaborator

BrooklinJazz commented Apr 15, 2024

There's a CI issue I should be able to fix fairly easily when I have time. Since it is an improvement, I'm going to merge this in. Thank you, @jonathanstiansen, for the catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants