Change IN-SUITE* to update the suite.
[fiveam.git] / t / tests.lisp
index 27b4229..e3a7e40 100644 (file)
 
     (def-test foo (:suite nil) t)
     (is-false (gethash 'foo (tests *suite*)))))
+
+
+;;;; test suites, *suite*, in-suite* behaviour
+
+(def-test suite-redefinition ()
+  (rem-test 'a-suite)
+  (in-suite* a-suite :description "a suite")
+  (let ((a-suite (get-test 'a-suite)))
+    (is (string= "a suite" (description a-suite)))
+
+    (in-suite* a-suite :description "the same suite")
+    (is (eq a-suite (get-test 'a-suite)))
+    (is (string= "the same suite" (description a-suite)))))