 ;; If I call (frozzle), I get this:
 ;;      Exception in thread "main" java.lang.Error: frozzle has no
 ;;      implementation. It's used in mock tests. (core_test.clj:1)
+
+
+
+
+
+(defn test-ns-hook []
+  "This calls the functions in order."
+  (example-of-a-simple-equality-test)
+  (example-of-a-simple-equality-test-failure)
+  (example-of-a-function-as-right-hand-side)
+  (example-of-an-exact-function-as-right-hand-side)
+  (example-of-a-predefined-checker)
+  (example-of-a-simple-fake)
+  (example-of-a-simple-fake-failure)
+  (example-of-multiple-faked-functions)
+  (example-of-interesting-functional-args)
+)
+

;; The following test fakes the first-fake so that it returns a
;; predefined value when it's called. After that, the result of
;; function-under-test is checked in the normal way. 
(deftest example-of-simple-fake
  (expect (function-under-test-1 3) => 5
      (fake (first-fake 3) => 5)))

;; Here's the failure when a fake is never called
(defn function-under-test-2 [_] 5)
(deftest example-of-simple-fake-failure
  (expect (function-under-test-2 3) => 5
      (fake (first-fake 3) => 5)))
;;     FAIL for (core_test.clj:80)
;;     This expectation was never satisfied:
;;     (first-fake 3) should be called at least once.


;; If you're testing something that produces a function, use
;; (exactly):
(deftest example-of-an-exact-function-as-right-hand-side
  (expect (first [even? odd?]) => (exactly odd?))                      (note-expected))
;;     Actual result did not pass expected function.
;;     expected function: (exactly odd?)
;;         actual result: #<core$even_QMARK___4680 clojure.core$even_QMARK___4680@494b6bed>
