From 7682b2c5ddaeb5a795fe253f4d8f30ae7cef0764 Mon Sep 17 00:00:00 2001 From: David Shepherd Date: Thu, 16 Mar 2017 12:54:23 +0000 Subject: Avoid calling vc-root-dir when it doesn't exist --- test/terminal-here-test.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/terminal-here-test.el b/test/terminal-here-test.el index e30a238..24f5ca4 100644 --- a/test/terminal-here-test.el +++ b/test/terminal-here-test.el @@ -55,3 +55,11 @@ (mock (vc-root-dir) => "vc-root") (mock (terminal-here-launch-in-directory "vc-root")) (terminal-here-project-launch))) + +(ert-deftest no-root-found () + (with-mock + (mock (projectile-project-root) => nil) + (mock (vc-root-dir) => nil) + (should-error + (terminal-here-project-launch) + :type 'user-error))) -- cgit v1.3