emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/buttercup 48a81c6bda 6/9: Add docstrings for the spy match


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup 48a81c6bda 6/9: Add docstrings for the spy matchers
Date: Wed, 21 Feb 2024 18:59:25 -0500 (EST)

branch: elpa/buttercup
commit 48a81c6bdaaf6d1b6da03b412bb6d04b6ecf2cc0
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    Add docstrings for the spy matchers
---
 buttercup.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/buttercup.el b/buttercup.el
index 8c0f381369..8b25ed4f00 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -718,12 +718,14 @@ UNEVALUATED-EXPR if it did not raise any signal."
                  thrown-signal expected-signal))))))
 
 (buttercup-define-matcher :to-have-been-called (spy)
+    "Check that SPY have been called at least once."
   (cl-assert (symbolp (funcall spy)))
   (if (spy-calls-all (funcall spy))
       t
     nil))
 
 (buttercup-define-matcher :to-have-been-called-with (spy &rest args)
+  "Check that SPY has been called at least once with arguments ARGS."
   (setq spy (funcall spy))
   (cl-assert (symbolp spy))
   (setq args (mapcar #'funcall args))
@@ -745,6 +747,7 @@ UNEVALUATED-EXPR if it did not raise any signal."
       t))))
 
 (buttercup-define-matcher :to-have-been-called-times (spy number)
+  "Check that SPY has been called exactly NUMBER times."
   (setq spy (funcall spy)
         number (funcall number))
   (cl-assert (symbolp spy))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]