;;;; When running tests we often need to setup some kind of context
;;;; (create dummy db connections, simulate an http request,
;;;; etc.). Fixtures provide a way to conviently hide this context
-;;;; into a macro and allow the test to fuces on testing.
+;;;; into a macro and allow the test to focus on testing.
;;;; NB: A FiveAM fixture is nothing more than a macro. Since the term
;;;; 'fixture' is so common in testing frameworks we've provided a
"Insert BODY into the fixture named FIXTURE-NAME.
See Also: DEF-FIXTURE"
+ (assert (get-fixture fixture-name)
+ (fixture-name)
+ "Unknown fixture ~S." fixture-name)
(destructuring-bind (largs &rest lbody) (get-fixture fixture-name)
`(macrolet ((&body () '(progn ,@body)))
(funcall (lambda ,largs ,@lbody) ,@args))))