                          (fn [e] (dosync (alter output conj e))))
                metrics [0.5 1 1.5 2 2.5]
                expect [2 2.5]]
-           
+
            (doseq [m metrics] (r {:metric m}))
            (is (= expect (vec (map (fn [s] (:metric s)) (deref output))))))))
 

                        (is (= (:state e)   "error"))
                        (is (= (:time e)    0))
                        (is (re-find #".*RuntimeException.*" (:description e)))
                        (is (= #{"exception" "java.lang.RuntimeException"} 
                               (set (:tags e))))))))

         (testing "scheduled fn"
                  (logging/suppress 
                    "riemann.streams"
                    (reset-time!)
                    (let [e     (atom nil)

                         (fn [e] (dosync (alter output conj e))))
               metrics [0.5 1 1.5 2 2.5]
               expect [0.5 2.5]]

           (doseq [m metrics] (r {:metric m}))
           (is (= expect (vec (map (fn [s] (:metric s)) (deref output))))))))

