 (ns forma.utils-test
-  (:use forma.utils
-        [forma.trends.analysis]
+  ""
+  (:use forma.utils :reload)
+  (:use forma.trends.analysis
         midje.sweet)
   (:require [forma.testing :as t])
   (:import  [java.io InputStream]
             [java.util.zip GZIPInputStream]))
 
 (facts "string conversion tests."  
-  "Floats!"
+  ;; Floats
   (strings->floats "192") => [192.0]
   (strings->floats "192" "12") => [192.0 12.0]
   
-  "Type checking."
+  ;; Type checking
   (strings->floats "192") => (just [float?])
   (strings->floats "192" "12") => (just [float? float?]))
 
 (facts "between? tests."
-  (between? -2 2 1) => truthy
+  (between? -2 2 1)  => truthy
   (between? -2 2 -2) => truthy
   (between? -2 2 -3) => falsey)
 
-(facts "thrush testing!
-
-Here are some examples of how to thread a value through a series of
-functions. This has some advantage over threading with `->`, as thrush
-is a function, not a macro, and can evaluate its arguments."
+(facts "thrush testing examples of how to thread a value through a
+  series of functions. This has some advantage over threading with
+  `->`, as thrush is a function, not a macro, and can evaluate its
+  arguments."
   (thrush 2 #(* % 5) (partial + 2)) => 12
   (apply thrush 1 (for [num (range 4)]
                     (fn [x] (+ x num)))) => 7)

  (weighted-mean 8 3 1 1) => 6.25
  (weighted-mean 8 0 1 1) => 1.0

  "Negative weights aren't acceptable."
  (weighted-mean 8 -1 1 1) => (throws IllegalArgumentException)

  "Values and weights must come in pairs."
  (weighted-mean 8 1 1) => (throws AssertionError))

(fact "trim-seq tests."

      bytes-filled => 10
      (every? (complement zero?) arr) => truthy)))

(fact "Partition-stream test. These are sort of crappy tests, but they
  do show that we have a sequence of byte arrays being generated."
  (with-open [txt (input-stream test-txt)]
    (let [result (partition-stream 10 txt)]
      (count (first result)) => 10
