fixturex.higher documentation
This namespace contains a few macros for making it a bit easier to define
common fixtures. Typically a fixture is meant to do setup, tear down, or wrap
around to add some context. The before, after and around macros do these
things.
after
macro
(after & body)
Create a fixture which executes the body after the passed in fixture is
invoked.
around
macro
(around & body)
Create a fixture function which executes the body around the invoked
fixture.
before
macro
(before & body)
Create a fixture which executes the body before the passed in fixture is
invoked.
before-and-after
macro
(before-and-after before after)
Create a fixture with a single before and after expression.
befores-and-afters
macro
(befores-and-afters before after)
redefs
macro
(redefs & bindings)
This is sugar for creating a fixture that redefines vars (via
`with-redefs`).
; These are the same
`(around with-redefs [bind ing])`
`(redefs bind ing)`.
with
macro
(with name & exprs)
Create a fixture which sets the value of a var with the name of the given
symbol to a delay on the given expression.
wrap
macro
(wrap name & bindings)
Like around but assumes the second argument is a vector (e.g. bindings).