Liking cljdoc? Tell your friends :D

clj-concordion.core


cljtest-reset-concordionclj

(cljtest-reset-concordion f)

clojure.test fixture to reset concordion between runs, see reset-concordion! Usage: (clojure.test/use-fixtures :once cljtest-reset-concordion)

clojure.test fixture to reset concordion between runs, see `reset-concordion!`
Usage: `(clojure.test/use-fixtures :once cljtest-reset-concordion)`
sourceraw docstring

deffixturecljmacro

(deffixture name & more)

Create a fixture object for a Concordion specification, exposing the functions needed by it, and a clojure.test test to execute the specification.

Params:

  • name - a package-prefixed name of the generated fixture class, optionally ending in Fixture (symbol or string) The name is also used to find the specification .md/.html file, just as in a Java/JUnit-based Concordion instrumentation.
  • methods - a vector of 1+ functions that will be exposed as methods on the fixture object. The function parameters and return value may be type-hinted as ^int or ^bool, the default being ^String (the only 3 types supported by Concordion).
  • opts - options for Concordion and this. See the spec for :cc/opts and the README for explanation

Example: Given the spec math/Addition.md with yields [4](- "?=add(#n1, #n2)") write (defn ^int add [^int n1, ^int n2] (+ n1 n2) and expose it to the spec. with: (deffixture math.AdditionFixture [add]).

See concordion instrumenting and coding docs for more details.

Create a fixture object for a Concordion specification, exposing the functions needed by it,
and a clojure.test test to execute the specification.

Params:
  - name - a package-prefixed name of the generated fixture class, optionally ending in Fixture (symbol or string)
           The name is also used to find the specification .md/.html file, just as in
           a Java/JUnit-based Concordion instrumentation.
  - methods - a vector of 1+ functions that will be exposed as methods on the fixture object.
            The function parameters and return value may be type-hinted as `^int` or `^bool`,
            the default being `^String` (the only 3 types supported by Concordion).
  - opts   - options for Concordion and this. See the spec for `:cc/opts` and the README for explanation

Example:
  Given the spec math/Addition.md with `yields [4](- "?=add(#n1, #n2)")`
  write `(defn ^int add [^int n1, ^int n2] (+ n1 n2)` and expose it to the spec. with:
  `(deffixture math.AdditionFixture [add])`.

See [concordion instrumenting](https://concordion.org/instrumenting/java/markdown/) and
[coding docs](https://concordion.org/coding/java/markdown/) for more details.
sourceraw docstring

reset-concordion!clj

(reset-concordion!)

Reset the results cache so that all tests will run anew instead of returning old, cached results. Intended for use from a REPL.

Reset the results cache so that all tests will run anew instead of returning
old, cached results. Intended for use from a REPL.
sourceraw docstring

test-fixturecljmacro

(test-fixture fname)

Test the specification associated with the fixture (by invoking the underlying clojure.test test function). Intended for use from a REPL.

Useful in combination with the :concordion/fail-fast option when you want to run only the one problematic specification instead of all the specs [in the ns].

Ex.: (deffixture Xyz {:concordion/fail-fast true}) (test-fixture Xyz)

(Note: It also does reset-concordion! since even if added as a hook, it wouldn't be invoked.)

Test the specification associated with the fixture
(by invoking the underlying clojure.test test function).
Intended for use from a REPL.

Useful in combination with the `:concordion/fail-fast` option when you want to
run only the one problematic specification instead of all the specs [in the ns].

Ex.:
 `(deffixture Xyz {:concordion/fail-fast true}) (test-fixture Xyz)`

 (Note: It also does `reset-concordion!` since even if added as a hook, it
 wouldn't be invoked.)
sourceraw docstring

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

× close