 (with-state-changes [(before :facts (do (reset! tap/fact-counter 0)
                                         (tap/set-last-namespace-shown! nil)))]
   (fact "failure also produces not ok"
-        (tap/starting-to-check-fact test-fact)
         (innocuously :fail test-failure-map) => (contains "\nnot ok 1")))

            [midje.emission.plugins.util :as util]))

(defn innocuously [key & args]
  (config/with-augmented-config {:emitter 'midje.emission.plugins.junit
                                 :print-level :print-facts}
    (captured-output (apply (key tap/emission-map) args))))


                                        (tap/set-last-namespace-shown! nil)))]
  (fact
   "pass produces ok with the index of the test"
   (innocuously :pass) => (contains "ok 1\n")
   (innocuously :pass) => (contains "ok 2\n")))

