Skip to content

Library to create mock ring requests for unit tests

License

Notifications You must be signed in to change notification settings

revelytix/ring-mock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.1"]

About

Library to create mock ring requests for unit tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 100.0%