Liking cljdoc? Tell your friends :D

clj-concordion.core


deffixturecljmacro

(deffixture name methods & 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 defined by org.concordion.api.FixtureDeclarations, as qualified keywords

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 defined by org.concordion.api.FixtureDeclarations, as qualified keywords

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

fixturesclj

INTERNAL Note: This is not reliable, as it seems state can be wiped out between test runs. But it is good enough for the purpose of resetting state that has not been wiped out (e.g. when running repeatedly from REPL).

INTERNAL
Note: This is not reliable, as it seems state can be wiped out between
test runs. But it is good enough for the purpose of resetting state that
has not been wiped out (e.g. when running repeatedly from REPL).
sourceraw docstring

impl-statusclj

source

new-fixtureclj

source

reset-concordion!clj

(reset-concordion!)

Reset the results cache so that all tests will run anew.

Reset the results cache so that all tests will run anew.
sourceraw docstring

run-fixtureclj

(run-fixture fixture suite?)

Test a Concordion specification using the given fixture object (which provides the functions used in the specification .md). The specification file is found on the classpath based on the name of the fixture's class.

Test a Concordion specification using the given fixture object
(which provides the functions used in the specification .md).
The specification file is found on the classpath based on the name
of the fixture's class.
sourceraw docstring

runResultsCacheclj

source

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

× close