Skip to content

Instantly share code, notes, and snippets.

(use 'clojure.contrib.find-namespaces
'clojure.test)
(def exit-code (atom 0))
(defn find-tests []
(filter
#(re-find #"-test" (str %)) (find-namespaces-in-dir (java.io.File. "test"))))
(defn require-tests []
(defn filenames-in-dir
"Returns pathnames relative to the dir."
[dir]
(map #(.. % getPath (replace dir ""))
(file-seq (java.io.File. dir))))
(defn available-books
(filter #(re-find #"pdf$" %) (filenames-in-dir "public/books")))
This is an incompatibility with the new ruby 1.9 C api. If you take a look at http://github.com/spicycode/rcov you will find a ruby19_compatibility branch that I am starting to address these issues in. It's not complete yet and probably won't be for a few more weeks. There are a lot of changes that need to be made to this in order for it to work properly with ruby 1.9