branch: elpa/with-simulated-input
commit 9fc83ac95d8355685e4cda96524ddcbbe04affea
Author: Ryan C. Thompson <[email protected]>
Commit: Ryan C. Thompson <[email protected]>

    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