[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup ce2d86ad84 4/4: Join the two definitions of :to-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup ce2d86ad84 4/4: Join the two definitions of :to-have-been-called |
Date: |
Mon, 26 Dec 2022 19:58:28 -0500 (EST) |
branch: elpa/buttercup
commit ce2d86ad84610499063854e7d471903c05fea1bf
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
Join the two definitions of :to-have-been-called
The newer version was defined first in the buttercup.el file an was
never used. Which was lucky as it did not work.
---
buttercup.el | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index 2fdcbdca8f..f0829148a9 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -498,7 +498,7 @@ See also `buttercup-define-matcher'."
((text-expr . text) (regexp-expr . regexp))
(mapcar #'buttercup--expr-and-value (list text regexp))
(save-match-data
- (let* (;; For string literals, juse use them normally, but for
+ (let* (;; For string literals, just use them normally, but for
;; expressions, show both the expr and its string value
(text-is-literal (equal text-expr text))
(regexp-is-literal (equal regexp-expr regexp))
@@ -646,8 +646,7 @@ See also `buttercup-define-matcher'."
:expect-mismatch-phrase expect-mismatch-text))))
(buttercup-define-matcher :to-have-been-called (spy)
- (setq spy (funcall spy))
- (cl-assert (symbolp spy))
+ (cl-assert (symbolp (funcall spy)))
(if (spy-calls-all (funcall spy))
t
nil))
@@ -1276,11 +1275,6 @@ in a `buttercup-with-cleanup' environment.")
nil
buttercup--spy-contexts))
-(buttercup-define-matcher :to-have-been-called (spy)
- (if (spy-calls-all (funcall spy))
- t
- nil))
-
(defun spy-calls-any (spy)
"Return t iff SPY has been called at all, nil otherwise."
(if (spy-calls-all spy)