You can use the around macro to accomplish this. Here's an example spec: (ns sample.core-spec (:require [speclj.core :refer :all] [sample.core :refer :all])) (describe "a test" (it "returns output from fn-a" (should= 1 (fn-b))) (describe "using with-redef" (around [it] (with-redefs [fn-a (fn [] 2)] (it))) (it "returns the output from redefined...
I coded up your example and the specs ran fine; passed without error. I can't think of a reason stubbing fns in a another namespace wouldn't work. I do it all the time. Here's a gist showing my work: https://gist.github.com/slagyr/2aed1ccfd8ec702d7051...
testing,clojure,functional-programming,leiningen,speclj
You could specify an alias in leiningen, add the following line to project.clj: :aliases {"test-all" ["do" ["test"] ["spec"]]} and run it with lein test-all...
Let's start from simple spec: (describe "truthiness" (it "tests if my-fn returns true" (should (my-fn)))) To make (it "tests if my-fn returns true" ...) characteristic pending: (describe "truthiness" (it "tests if my-fn returns true" (pending "my-fn should be revisited") ; If message is not specified "Not Yet Implemented" will be...