evnu / docception

Run Elixir doctests on arbitrary markdown files
Apache License 2.0
6 stars 2 forks source link

Maybe deprecate this library in favor of ExUnit.DocTest.doctest_file/2? #11

Closed axelson closed 1 year ago

axelson commented 1 year ago

In Elixir 1.15 ExUnit.DocTest.doctest_file/2 was added which allows you to easily doctest an arbitrary markdown file. I think that updating the readme of this project to point to ExUnit.DocTest.doctest_file/2` will help people find the new function.

Although if you have plans that extend beyond what ExUnit.DocTest.doctest_file/2 then of course there's no need to deprecate the library!

evnu commented 1 year ago

Thanks, I will look into that function! Hopefully, it can be used as a simple alias, then I will archive this repository and add a note to use that function :)

evnu commented 1 year ago

Well, can't use an alias (as doctest_file/1,2 is a macro generating functions, similar to what docception did, but doing this at compile time), so it cannot be used in a function. But, a for comprehension can be used to generate a bunch of such macro calls, see #12.