Created
June 20, 2013 15:45
-
-
Save PuercoPop/5823936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun test-collector () | |
"Looks for all the triplets and defines a test for them. In current suite or | |
taking a suite as an argument? " | |
(loop | |
for triplet in (setup-test-tuples | |
(merge-pathnames "requests/valid/*.http" *specs-dir*)) | |
do | |
(let ((http-file (first triplet)) | |
(request-file (second triplet)) | |
(spec-file (third triplet))) | |
`(test ,(gensym) () | |
(let* ((http-stream (open http-file)) | |
(expected-request (read (open request-file))) | |
(request-tests (read (open spec-file)))) | |
(close http-stream) | |
(eval request-tests)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment