by Bruce Tate
In Chapter 21, A Testing Framework for Elixir, I described a new unit and functional test framework we’ve built. In this article, I’ll describe how we use macros to build fake test data.
At icanmakeitbetter, Elixir has made a huge difference. Because it is a functional language that fully supports concurrency and distribution, we are able to get much more performance out of our website. Elixir is also one of the first languages to support both a higher-level syntax and macros, and I’m going to talk about putting those features to good use to build beautiful test data.
Yes, I said beautiful.
Business applications need business data, and tests for those applications need fake data. ...