Liking cljdoc? Tell your friends :D

Ring-Mock

Ring-Mock is a library for creating Ring request maps for testing purposes.

Installation

Add the following development dependency to your project.clj file:

[ring-mock "0.1.5"]

Documentation

Example

(ns your-app.test.core
  (:use your-app.core
        clojure.test
        ring.mock.request))

(deftest your-handler-test
  (is (= (your-handler (request :get "/doc/10"))
         {:status 200
          :headers {"content-type" "text/plain"}
          :body "Your expected result"})))

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close