Switch to doctest for Igniter.Code.Common.add_code/3#248
Switch to doctest for Igniter.Code.Common.add_code/3#248zachdaniel merged 2 commits intoash-project:mainfrom
Conversation
Fixes a typo in the existing docs
|
Hmm...yeah that's interesting. The value of the secrets is pretty high even if it looks a bit less good. When you click the button to copy this do you get all the |
Clicking the button (or selecting the text directly) doesn't include the which can be directly copied and pasted to an IEx terminal that has Igniter as a dep. But yeah it isn't really the most readable. Maybe it would make more sense to split it into two, a smaller more limited doctest and a larger by hand example (I think we could make that larger example flow a bit better than the current version on |
Do you mean doctest instead of secrets? |
|
Yes, that was autocorrect 😂 |
|
I'm down with this. It is slightly less readable but more conventional. |
|
Good to merge? |
|
Yeah, let's do it! 🎉 |
Fixes a typo in the existing docs and switches to doctests to ensure that the docs do not get out of date.
But I am not quite 100% convinced that this is necessarily more readable, it feels a bit awkward to me. I wish I could write a better assertion as the last line of the doctest, we could use a heredoc but then we'd have to annoyingly deal with the trailing newline.
Here's the new and old docs:
Contributor checklist