fixturex.context documentation
Various functions for easy dynamic context (e.g. RSpec).
$
macro
($ form)
Lookup the given Named in context.
binding-pairs->context
(binding-pairs->context bound-symbols binding-pairs)
Create a context map from a sequence of keyword form pairs.
A context map has keyword keys and the values are forms of thunks.
deftest-ctx
macro
(deftest-ctx name bindings & body)
Defines a test just like clojure test, but with the given bindings context
around the body.
lookup
(lookup k)
Lookup the thunk at the given key in the context and invoke it if it exists
replace-bound-vars-in-body
(replace-bound-vars-in-body bound-symbols body)
Replace appearances of symbols bound in the current context with lookup
calls in the given body.
scoped
macro
(scoped sym-names & body)
Replace given bindings with context lookups.
testing-ctx
macro
(testing-ctx msg bindings & body)
Define testing context just like testing but with the given context bindings
around the body.
where
macro
(where & bindings)
Create a fixture for adding or modifying bindings in context.
with-context
macro
(with-context bindings & forms)
Define context bindings around the given body.