Liking cljdoc? Tell your friends :D

aleph-http.stub


*call-counts*clj

source

*expected-counts*clj

source

*in-isolation*clj

source

*stub-routes*clj

source

stub-requestclj

(stub-request original-fn request)

Internal function used by with-http-stub macro

Internal function used by with-http-stub macro
sourceraw docstring

verify-call-counts!clj

(verify-call-counts!)
source

with-http-stubcljmacro

(with-http-stub routes & body)

Takes a map of route/response-fn pairs and executes the body with HTTP requests stubbed. Routes can be:

  • Exact URL strings
  • Regular expressions
  • Functions that take a URL and return true/false

Response functions should take a request map and return a response map with: {:status 200 :headers {} :body "response"}

Takes a map of route/response-fn pairs and executes the body with HTTP requests stubbed.
Routes can be:
- Exact URL strings
- Regular expressions
- Functions that take a URL and return true/false

Response functions should take a request map and return a response map with:
{:status 200 :headers {} :body "response"}
sourceraw docstring

with-http-stub-in-isolationcljmacro

(with-http-stub-in-isolation routes & body)

Like with-http-stub, but throws an exception if no matching stub is found

Like with-http-stub, but throws an exception if no matching stub is found
sourceraw docstring

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

× close