O'Reilly logo

Clojure Applied by Alex Miller, Ben Vandgrift

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

Interactive REPL Tests

Clojure programmers often work interactively at a REPL to develop functions. The workflow consists of writing a function either in the REPL or in a namespace editor, evaluating that code, and executing that code with sample inputs. Often we visually inspect the results, sometimes saving them so we can perform more detailed checks of their behavior.

The next question is whether the inputs and expected outputs are worth capturing into a test that can run all the time. Some things to consider are:

  • Is the test checking business logic or verifying the behavior of chaining together standard Clojure functions? Tests for the logic of your application are almost certainly worth keeping. Simple uses of Clojure itself (say, a function ...

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