]> code.delx.au - gnu-emacs/blobdiff - test/lisp/calendar/icalendar-tests.el
Remove ‘ert-with-function-mocked’ macro in favour of ‘cl-letf’ macro
[gnu-emacs] / test / lisp / calendar / icalendar-tests.el
index 20d88349bbc3ae7342fd38a166d54c1ec17233ba..6db4222697e077f798c52269ff45198b9542b5df 100644 (file)
@@ -32,7 +32,6 @@
 ;;; Code:
 
 (require 'ert)
-(require 'ert-x)
 (require 'icalendar)
 
 ;; ======================================================================
@@ -64,7 +63,7 @@
          (hash (format "%d" (abs (sxhash entry-full))))
          (contents "DTSTART:19640630T070100\nblahblah")
          (username (or user-login-name "UNKNOWN_USER")))
-    (ert-with-function-mocked current-time (lambda () '(1 2 3))
+    (cl-letf (((symbol-function 'current-time) (lambda () '(1 2 3))))
       (should (= 77 icalendar--uid-count))
       (should (string=  (concat "xxx-123-77-" hash "-" username "-19640630")
                         (icalendar--create-uid entry-full contents)))