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

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

[nongnu] elpa/with-simulated-input 9fc83ac95d 047/134: Put spies in befo


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 9fc83ac95d 047/134: Put spies in before-each form
Date: Mon, 10 Jan 2022 23:00:03 -0500 (EST)

branch: elpa/with-simulated-input
commit 9fc83ac95d8355685e4cda96524ddcbbe04affea
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>

    Put spies in before-each form
---
 tests/test-with-simulated-input.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/test-with-simulated-input.el 
b/tests/test-with-simulated-input.el
index ff21b10cb8..9f32fc0c24 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -166,12 +166,13 @@
 
 (describe "`wsi-simulate-idle-time'"
 
-  (spy-on 'idle-canary)
-  (spy-on 'timer--activate
-          :and-call-fake
-          (lambda (timer &rest args)
-            (push timer timers-to-cancel)
-            (apply orig-timer--activate timer args)))
+  (before-each
+    (spy-on 'idle-canary)
+    (spy-on 'timer--activate
+            :and-call-fake
+            (lambda (timer &rest args)
+              (push timer timers-to-cancel)
+              (apply orig-timer--activate timer args))))
 
   (after-each
     (mapcar #'cancel-timer timers-to-cancel)



reply via email to

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