aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Drozd <nicholasdrozd@gmail.com>2018-06-14 21:13:22 -0500
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2018-06-16 12:53:27 +0300
commitbde7d142cdeb97d1bd7d22bc76bf7c8bbed40a85 (patch)
treed7b601662ac832c5133c19a2260f4cb1306adf1e /test
parentd0b9c329b63571226681f6c52e2d5a17168b94a7 (diff)
[Fix #1246] Give clear-known-projects test temp project file
This test was blowing away the actual project file, rather than a test file. To fix this, move the test to the known-project-test file and give it test-tmp-file-path.
Diffstat (limited to 'test')
-rw-r--r--test/.gitignore3
-rw-r--r--test/projectile-known-project-test.el6
-rw-r--r--test/projectile-test.el7
3 files changed, 8 insertions, 8 deletions
diff --git a/test/.gitignore b/test/.gitignore
index 7650738..0a8e3c0 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1 +1,2 @@
-sandbox/ \ No newline at end of file
+sandbox/
+tmp/
diff --git a/test/projectile-known-project-test.el b/test/projectile-known-project-test.el
index 7b9210f..eb2223e 100644
--- a/test/projectile-known-project-test.el
+++ b/test/projectile-known-project-test.el
@@ -134,6 +134,12 @@ test temp directory"
(when (file-exists-p this-test-file)
(delete-file this-test-file)))))
+(ert-deftest projectile-clear-known-projects ()
+ (let ((projectile-known-projects '("one" "two" "three"))
+ (projectile-known-projects-file (projectile-test-tmp-file-path)))
+ (projectile-clear-known-projects)
+ (should (null projectile-known-projects))))
+
;; Local Variables:
;; indent-tabs-mode: nil
;; End:
diff --git a/test/projectile-test.el b/test/projectile-test.el
index 2af6088..09c1d95 100644
--- a/test/projectile-test.el
+++ b/test/projectile-test.el
@@ -557,13 +557,6 @@
(re-search-forward sym)
(projectile-grep nil ?-)))))))))
-;;;;;;;;; fresh tests
-
-(ert-deftest projectile-clear-known-projects ()
- (let ((projectile-known-projects '("one" "two" "three")))
- (projectile-clear-known-projects)
- (should (null projectile-known-projects))))
-
(ert-deftest projectile-switch-project-no-projects ()
(let ((projectile-known-projects nil))
(should-error (projectile-switch-project))))