           (should= '("blog" "1234")
                    (split-path "/blog/1234")))))))
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+(describe "respond"
+  (it "EmptyResponse"
+    (should= (not-found)
+             (respond (->EmptyResponse))))
+  (it "Response"
+    (should= (->Response 200 {} "OK")
+             (respond (->Response 200 {} "OK"))))
+  (it "nil"
+    (should= (text-response 204 "")
+             (respond nil)))
+  (it "String"
+    (should= (ok "OK")
+             (respond "OK")))
+  (context "APersistentMap"
+    (it "JSON"
+      (should= (->json {:name "Billy" :age 35})
+               (respond {:name "Billy" :age 35})))
+    (it "EDN"
+      (should= (->edn {:name "Billy" :age 35})
+               (with-edn-formatting
+                 (respond {:name "Billy" :age 35})))))
+  (context "Sequential"
+    (it "JSON"
+      (should= (->json [:Billy "Bobby"])
+               (respond [:Billy "Bobby"])))
+    (it "EDN"
+      (should= (->edn [:Billy "Bobby"])
+               (with-edn-formatting
+                 (respond [:Billy "Bobby"])))))
+  (context "IPersistentSet"
+    (it "JSON"
+      (should= (->json #{:Billy "Bobby"})
+               (respond #{:Billy "Bobby"})))
+    (it "EDN"
+      (should= (->edn #{:Billy "Bobby"})
+               (with-edn-formatting
+                 (respond #{:Billy "Bobby"})))))
+  (it "IDeref"
+    (should= (ok "Billy")
+             (respond (atom "Billy"))))
+  (it "Object"
+    (should= (ok "3")
+             (respond 3))))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

    (with-fn-validation (it)))
  (it "request"
    (should= (->json (req "/req" :get))
             (responder (req "/req" :get))))
  (it "url"
    (should= (ok "/url")
             (responder (req "/url" :get))))
  (it "params"
    (should= (->json {:type "json"})
             (responder
               (-> (req "/params" :get)
                   (assoc :params {:type "json"})))))
  (it "lookup-param"
    (should= (ok "json")
             (responder
               (-> (req "/lookup-param" :get)
                   (assoc :params {:type "json"})))))
  (it "headers"
    (should= (->json {"Accept-Language" "en-US"})
             (responder
               (-> (req "/headers" :get)
                   (assoc :headers {"Accept-Language" "en-US"})))))
  (it "lookup-header"
    (should= (ok "en-US")
             (responder
               (-> (req "/lookup-header" :get)
                   (assoc :headers {"Accept-Language" "en-US"})))))
  (it "body"
    (should= (ok "name=Billy")
             (responder
               (-> (req "/body" :get)
                   (assoc :body "name=Billy"))))))


  (path "faq"
    (pred faqs [faq]
      (str "FAQ: " faq)))
  (pred old-or-new [choice]
    (str "You chose: " choice))
  (path "about"
    (method :ANY "This is my blog."))
  (path "black-hole"
