X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Ffixture.lisp;h=d5ff66449b69790506ad6e46c22199f67a9a13c5;hb=47e54369152b69e10aa6b6e60ad9ccb68deb00b0;hp=325933c0b9864a64916de9a3ae3f3bce6ada9f20;hpb=1454981ac5f4f7ea8fe741a8125efbf0b09497ea;p=fiveam.git diff --git a/src/fixture.lisp b/src/fixture.lisp index 325933c..d5ff664 100644 --- a/src/fixture.lisp +++ b/src/fixture.lisp @@ -7,7 +7,7 @@ ;;;; 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 @@ -33,6 +33,9 @@ See Also: WITH-FIXTURE "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))))