         (keyword?  test) :tag
         :else            :ns))
 
-(defn group-opts [coll]
-  ;; don't use group-by so we are compatible with 1.1
-  (reduce
-   (fn [ret x]
-     (let [k (test-type x)]
-       (assoc ret k (conj (get ret k []) x))))
-   {}
-   coll))
-
 (defn get-grouped-tests [namespaces opts]
   (let [tests (:test opts)]
-    (group-opts
+    (group-by
+     test-type
      (if (nil? tests)
        namespaces
        (map prep-opt tests)))))

(ns bake.test
  (:use [cake.contrib.find-namespaces :only [find-namespaces-in-dir]])
  (:require clojure.test
            [clojure.stacktrace :as stack]))

(defn map-tags [nses]
  (reduce (partial merge-with concat)
          (for [ns nses
                [name f] (ns-publics ns)
                tag (:tags (meta f))]
            {tag [f]})))

(defn all-test-namespaces []
  (find-namespaces-in-dir (java.io.File. "test")))

  (println (:fail m) "failures," (:error m) "errors.")
  (when (:start-time m) (timer (:start-time m))))

(defmethod test/report :begin-test-ns [m]
  (test/with-test-out
   (println "\nTesting" (ns-name (:ns m)))))

(defmethod test/report :summary [m]
  (test/with-test-out
    (print-results m)))

<<<<<<< HEAD
(defmethod clojure.test/report :fn-summary [m]
  (clojure.test/with-test-out
    (print-results m)))

(defmethod clojure.test/report :begin-auto [m])
=======
(defmethod test/report :begin-auto [m])
>>>>>>> fix bugs in test

(defmethod test/report :summary-auto [m]
  (test/with-test-out
    (if (and (= 0 (:fail m))
             (= 0 (:error m))
             (not (:full-report? m)))
