 (deftest test-word-count
   (let [data (pig/return [["The fox jumped over the dog."]
                           ["The cow jumped over the moon."]])]
-    (is (= (pig/dump (word-count data))
-           [["moon" 1] ["jumped" 2] ["dog" 1] ["over" 2] ["cow" 1] ["fox" 1] ["the" 4]]))))
+    (is (= (set (pig/dump (word-count data)))
+           #{["moon" 1] ["jumped" 2] ["dog" 1] ["over" 2] ["cow" 1] ["fox" 1] ["the" 4]}))))
 
 (defn reusable-fn [lower-bound data]
   (let [upper-bound (+ lower-bound 10)]


(defn my-data-2 []
  (->>
    (pig/load-tsv "example/input.tsv")
    (pig/map (fn [[a b c]]
               {:sum (+ (Integer/valueOf a) (Integer/valueOf b))
                :name c}))))

           [10]))))

(deftest test-write-script
  (pig/write-script "build/readme-test/word-count.pig" (word-count-query "input.tsv" "output.tsv")))

(defn my-data-1 []
  (pig/load-tsv "build/readme-test/input.tsv"))

(spit "build/readme-test/input.tsv" "1\t2\tfoo\n4\t5\tbar")

(deftest test-mydata-1
  (is (= (pig/dump (my-data-1))
