Liking cljdoc? Tell your friends :D

lazytest.experimental.interfaces.midje

EXPERIMENTAL. COULD BE CHANGED AT ANY TIME. Please share usage reports at https://github.com/noahtheduke/lazytest/issues.

An adaption of the Midje framework. Only adapts the fact and facts macros. fact acts like lazytest.core/it for the purposes of test-cases.

Unlike Midje, facts is not an alias for fact, and fact not support the (given => expected) syntax as that's highly complex and outside the scope of this namespace.

prep-ns-suite! must be called before facts, as they expect :lazytest/ns-suite to point to an existing suite.

Example:

(ns noahtheduke.example-test
  (:require
   [lazytest.experimental.interfaces.midje :refer [prep-ns-suite! facts fact]]))

(prep-ns-suite!)

(facts "a simple top level test"
  (fact "a test case"
    (expect true "expect works inside"))
  (facts "a nested facts call"
    (fact "this still works"
      (expect true))))
EXPERIMENTAL. COULD BE CHANGED AT ANY TIME. Please share usage reports at <https://github.com/noahtheduke/lazytest/issues>.

An adaption of the [Midje](https://github.com/marick/midje) framework. Only adapts the [[fact]] and [[facts]] macros. [[fact]] acts like [[lazytest.core/it]] for the purposes of test-cases.

Unlike Midje, [[facts]] is not an alias for [[fact]], and [[fact]] not support the `(given => expected)` syntax as that's highly complex and outside the scope of this namespace.

[[prep-ns-suite!]] must be called before [[facts]], as they expect `:lazytest/ns-suite` to point to an existing suite.

Example:
```clojure
(ns noahtheduke.example-test
  (:require
   [lazytest.experimental.interfaces.midje :refer [prep-ns-suite! facts fact]]))

(prep-ns-suite!)

(facts "a simple top level test"
  (fact "a test case"
    (expect true "expect works inside"))
  (facts "a nested facts call"
    (fact "this still works"
      (expect true))))
```
raw docstring

factcljmacro

(fact doc & body)

Define a test case. If top-level, place it in the namespace suite, otherwise act like lazytest.core/it.

Define a test case. If top-level, place it in the namespace suite, otherwise act like [[lazytest.core/it]].
sourceraw docstring

factscljmacro

(facts test-name attr-map? & children)
(facts doc attr-map? & children)

Define a suite. If top-level, place the suite in the namespace suite, otherwise act like lazytest.core/describe.

Define a suite. If top-level, place the suite in the namespace suite, otherwise act like [[lazytest.core/describe]].
sourceraw docstring

prep-ns-suite!clj

(prep-ns-suite!)

Set the ns :lazytest/ns-suite to a fresh suite.

Set the *ns* :lazytest/ns-suite to a fresh suite.
sourceraw docstring

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

× close