This project shows how to test private functions in Clojure.
The code in core.clj
has two functions in the demo.core
namespace
add
: A public functionprivate-add
: A private function
The test code in the core_test.clj
in a separate namespace demo.core-test
From the terminal, run
lein test
- Nurullah Akkaya @nakkaya blog post on Unit Testing in Clojure
- Christopher Maier @cwm blog post Not So Private Clojure Functions