diff options
author | colin <colin@cicadas.surf> | 2023-11-25 15:44:18 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-11-25 15:44:18 -0800 |
commit | 4ade7d8df5662651c8eb421b9ba6ac96d9260e28 (patch) | |
tree | 29a5f263f1bc3973a1a276ec8522887685e31e03 | |
parent | 477c7d44bfaac224160a203667f6856621d50c28 (diff) |
examples
-rw-r--r-- | examples/examples.lisp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/examples/examples.lisp b/examples/examples.lisp index 99ad26e..4088d32 100644 --- a/examples/examples.lisp +++ b/examples/examples.lisp @@ -56,10 +56,6 @@ tests that aren't part of the package you're testing." ;;; Stubbing functions with :WITH-DEFUNS -(defun dummy::make-drakma-request (url) - "Assume this actually makes an HTTP request using drakma" - ) - (defun test-count-words-in-response () (assert (= 3 (count-words-in-response "blah")))) @@ -67,14 +63,14 @@ tests that aren't part of the package you're testing." "Fetches a url and counts the words in the response." #+testiere (:tests - (:with-defuns - ((dummy::make-drakma-request (url) - (declare (values (simple-array character))) - "Hello there dudes")) + ;; here we stub a fictitious make-drakma-request function + (:with-defuns ((dummy::make-drakma-request (url) + (declare (ignore url)) + "Hello there dudes")) (= 3 (count-words-in-response "dummy-url")) (:funcall 'test-count-words-in-response))) (loop - :with resp string := (dummy::make-drakma-request url) + :with resp := (dummy::make-drakma-request url) :with in-word? := nil :for char :across resp :when (and in-word? (not (alphanumericp char))) |