Skip to content

Commit

Permalink
[Fix clojure-emacs#2659] Fix tests on Emacs 25
Browse files Browse the repository at this point in the history
`temporary-file-directory` the function was introduced in Emacs 26 so
the tests failed on Emacs 25. Change to use `temporary-file-directory`
the variable instead as it's present in both versions.
  • Loading branch information
rpkarlsson committed Jul 6, 2019
1 parent 51b5dda commit 65a963b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/cider-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,10 @@
(defmacro with-temp-shadow-config (contents &rest body)
"Run BODY with a mocked shadow-cljs.edn project file with the CONTENTS."
`(let* ((edn-file "shadow-cljs.edn")
(temp-dir (temporary-file-directory))
(file-path (concat temp-dir edn-file)))
(file-path (concat temporary-file-directory edn-file)))
(with-temp-file file-path
(insert ,contents))
(spy-on 'clojure-project-dir :and-return-value temp-dir)
(spy-on 'clojure-project-dir :and-return-value temporary-file-directory)
,@body
(delete-file file-path)))

Expand Down

0 comments on commit 65a963b

Please sign in to comment.