The Sounds of Silence
Hello darkness my old friend
I've come to talk with you again
-- Simon & Garfunkel ~ The Sounds of Silence
In keeping with the Unix philosophy, tests (and other programs) should produce
no output when they execute normally unless they are explicitly asked to.
Unfortunately, it can be difficult to track down what's writing to
how to go make it stop.
This library provides a pair of
clojure.test fixtures named
silence as a fixture mutes all output to
by simply providing a bindings to a no-op
*err* fatal, by throwing an
IOException when either
output stream is written to.
(ns my.tests (:require [clojure.test :refer [use-fixtures is deftest]] [sounds-of-silence :refer [lamentation]])) (use-fixtures :each lamentation) (deftest my-test (println "This will cause an IOException!"))
Copyright © 2017 Reid 'arrdem' McKenzie
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.