Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Library to create mock ring requests for unit tests
Clojure
tag: 0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/ring/mock
test/ring/mock/test
.gitignore
LICENSE.html
README.md
project.clj

README.md

Ring-Mock

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

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"})))

Installation

Add the following to your Leiningen dependencies:

[ring-mock "0.1.0"]
Something went wrong with that request. Please try again.