Added ability to specify fixtures on the suite object itself (instead of having to...
[fiveam.git] / t / tests.lisp
index 741a8d6..3592ee5 100644 (file)
   (for-all (((a b) (dummy-mv-generator)))
     (is (= 1 a))
     (is (= 1 b))))
+
+(defvar *special-variable* nil)
+
+(def-fixture fixture-for-suite (value)
+  (progn
+    (setf *special-variable* value)
+    (&body)))
+
+(def-suite suite-with-fixture :fixture (fixture-for-suite 42) :in :it.bese.fiveam)
+
+(def-test test-with-suite-fixture (:suite suite-with-fixture)
+  (is (= 42 *special-variable*)))