O'Reilly logo

Clojure for Domain-specific Languages by Kelker Ryan

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

Chapter 10. Unit Testing

Unit testing has become a popular method of determining the correctness of a portion of code. These tests are built during the development process and help isolate the correct and incorrect code behaviors of a program. Specifically, in test-driven development, the tests are written first, and then the code is written to pass the tests.

Although the Clojure language is still very young, there are many unit testing frameworks that help segregate the tests from the development source code. This chapter will briefly cover the clojure.test, expectations, midje, and speclj unit testing frameworks. Each framework will be used to perform tests on the Twitter DSL created in the last chapter.

This chapter covers some of the basics ...

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