Clean up & refactor tests

This commit is contained in:
Henrik Lissner 2019-11-15 02:14:42 -05:00
parent 2b36740325
commit 9108f4780e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
6 changed files with 120 additions and 50 deletions

View file

@ -21,14 +21,14 @@
(describe "project-root"
(it "should resolve to the project's root"
(expect (doom-project-root doom-core-dir) :to-equal doom-emacs-dir))
(expect (doom-project-root doom-core-dir) :to-equal-file doom-emacs-dir))
(it "should return nil if not in a project"
(expect (doom-project-root (expand-file-name "~")) :to-be nil)))
(describe "project-expand"
(it "expands to a path relative to the project root"
(expect (doom-project-expand "init.el" doom-core-dir)
:to-equal (expand-file-name "init.el" (doom-project-root doom-core-dir)))))
(expect (doom-project-expand "init.el" doom-core-dir) :to-equal-file
(expand-file-name "init.el" (doom-project-root doom-core-dir)))))
(describe "project-file-exists-p!"
(let ((default-directory doom-core-dir))