diff options
-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))) |