# Testing Elixir: use \`setup\` instead of \`setup\_all\` in code example (page 16)

**URL:** <https://forum.devtalk.com/t/testing-elixir-use-setup-instead-of-setup-all-in-code-example-page-16/10528>\
**Category:** PragProg Customers\
**Tags:** book-testing-elixir, errata\
**Created:** [14 June 2021 15:47 UTC](https://forum.devtalk.com/t/testing-elixir-use-setup-instead-of-setup-all-in-code-example-page-16/10528 "2021-06-14T15:47:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubyist](https://forum.devtalk.com/user_avatar/forum.devtalk.com/rubyist/32/2961_2.png) [@rubyist](https://forum.devtalk.com/u/rubyist)\
**Post date:** [14 June 2021 15:47 UTC](https://forum.devtalk.com/t/testing-elixir-use-setup-instead-of-setup-all-in-code-example-page-16/10528/1 "2021-06-14T15:47:29Z")

</div>

The code on page 16 of beta 6 uses `setup_all` but I believe this should be `setup`. The code in `response_parser_test.bak.exs` uses `setup` and the use of `setup_all` throws an error.

---

<div class="post-metadata">

**Author:** ![adamu](https://forum.devtalk.com/user_avatar/forum.devtalk.com/adamu/32/1107_2.png) [@adamu](https://forum.devtalk.com/u/adamu)\
**Post date:** [23 July 2021 06:51 UTC](https://forum.devtalk.com/t/testing-elixir-use-setup-instead-of-setup-all-in-code-example-page-16/10528/2 "2021-07-23T06:51:26Z")

</div>

Yep, I’ve just found this too.

Unfortunately, the book has been finalized now, so I doubt they’ll fix it. Maybe they will publish fixed versions of the ebooks?

Interestingly, this error is not present in B4, but it is in the final Beta (B7).

I know they are demonstrating the use of `setup` here, but considering that the setup block is only used by the first test, it would be better to just do it as part of that test. As a compromise, a better fix might be to move the `setup_all` block outside of the `describe` block, so that it only runs once for all the tests.
