O'Reilly logo

Functional Programming: A PragPub Anthology by Michael Swaine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Investing in Testing

At icanmakeitbetter, we have a test-heavy philosophy that strongly embraces this fundamental rule:

  • Test all of your code with pretty, isolated, fast tests.

That’s a dense sentence. Let’s break it down.

  • Test all of your code: we do test every single line we write, and we measure that coverage in Elixir with coveralls.[24] If a line of code is worth writing, it’s worth testing.

  • with pretty: we believe test cases should be first-class citizens. Because we write so many tests, every single tick of punctuation counts, and the vocabulary we choose is important to us. Tests are stories, and should read like them.

  • isolated, fast tests: we believe isolated tests are easier to maintain. Setup code should be isolated, too. Isolated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required