elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24.62k stars 3.38k forks source link

Examples for ExUnit callbacks and contexts could be improved #9635

Closed everettvody closed 5 years ago

everettvody commented 5 years ago

Specifically, the relationship between the setup functions and the test context could be demonstrated more effectively. Also, it would be helpful to mention "fixtures" since that's the role that these macros fill, and mentioning that term may help others coming from other languages/frameworks may understand these functions more quickly if that name is used. Lastly, a few more examples to clarify the output format of these blocks (i.e. it is a bit strange to allow a map, or a :ok, map shape and the downstream functions don't care.

everettvody commented 5 years ago

PR for this is here: https://github.com/elixir-lang/elixir/pull/9631

josevalim commented 5 years ago

Thanks @everettvody! We saw the PR and we will review it soon. Meanwhile we will close this in favor of the PR itself. :)