summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVitalie Spinu <spinuvit@gmail.com>2017-08-30 22:07:48 +0200
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2017-09-05 20:37:45 +0300
commit7a7225929138d13163b96d68fd80b018de357ca0 (patch)
tree66af39e7046cce5847fd5b8298be6a70b09d35fb /test
parent61c1f0b53cb1488fb1d264c890e39bacca0e6bb9 (diff)
Fix tests
Diffstat (limited to 'test')
-rw-r--r--test/cider-apropos-tests.el8
-rw-r--r--test/cider-classpath-tests.el8
-rw-r--r--test/cider-client-tests.el4
-rw-r--r--test/cider-interaction-tests.el40
4 files changed, 30 insertions, 30 deletions
diff --git a/test/cider-apropos-tests.el b/test/cider-apropos-tests.el
index 63767cf8..9bd0502f 100644
--- a/test/cider-apropos-tests.el
+++ b/test/cider-apropos-tests.el
@@ -34,17 +34,17 @@
(describe "cider-apropos"
(it "raises user-error when cider is not connected."
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-apropos "test")) :to-throw 'user-error))
+ (expect (cider-apropos "test") :to-throw 'user-error))
(it "raises user-error when the `apropos' op is not supported."
(spy-on 'cider-ensure-op-supported :and-return-value nil)
- (expect (lambda () (cider-apropos "test")) :to-throw 'user-error)))
+ (expect (cider-apropos "test") :to-throw 'user-error)))
(describe "cider-apropos-documentation"
(it "raises user-error when cider is not connected."
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-apropos-documentation)) :to-throw 'user-error))
+ (expect (cider-apropos-documentation) :to-throw 'user-error))
(it "raises user-error when the `apropos' op is not supported."
(spy-on 'cider-ensure-op-supported :and-return-value nil)
- (expect (lambda () (cider-apropos-documentation)) :to-throw 'user-error)))
+ (expect (cider-apropos-documentation) :to-throw 'user-error)))
diff --git a/test/cider-classpath-tests.el b/test/cider-classpath-tests.el
index fb8f97d1..76c5a8ba 100644
--- a/test/cider-classpath-tests.el
+++ b/test/cider-classpath-tests.el
@@ -34,17 +34,17 @@
(describe "cider-classpath"
(it "raises user-error when cider is not connected."
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-classpath)) :to-throw 'user-error))
+ (expect (cider-classpath) :to-throw 'user-error))
(it "raises user-error when the `classpath' op is not supported."
(spy-on 'cider-ensure-op-supported :and-return-value nil)
- (expect (lambda () (cider-classpath)) :to-throw 'user-error)))
+ (expect (cider-classpath) :to-throw 'user-error)))
(describe "cider-open-classpath-entry"
(it "raises user-error when cider is not connected."
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-open-classpath-entry)) :to-throw 'user-error))
+ (expect (cider-open-classpath-entry) :to-throw 'user-error))
(it "raises user-error when the `classpath' op is not supported."
(spy-on 'cider-ensure-op-supported :and-return-value nil)
- (expect (lambda () (cider-open-classpath-entry)) :to-throw 'user-error)))
+ (expect (cider-open-classpath-entry) :to-throw 'user-error)))
diff --git a/test/cider-client-tests.el b/test/cider-client-tests.el
index 2206dc47..65603606 100644
--- a/test/cider-client-tests.el
+++ b/test/cider-client-tests.el
@@ -438,7 +438,7 @@
(expect (cider-ensure-connected) :to-equal nil))
(it "raises a user-error in the absence of a connection"
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-ensure-connected)) :to-throw 'user-error)))
+ (expect (cider-ensure-connected) :to-throw 'user-error)))
(describe "cider-ensure-op-supported"
(it "returns nil when the op is supported"
@@ -446,7 +446,7 @@
(expect (cider-ensure-op-supported "foo") :to-equal nil))
(it "raises a user-error if the op is not supported"
(spy-on 'cider-nrepl-op-supported-p :and-return-value nil)
- (expect (lambda () (cider-ensure-op-supported "foo"))
+ (expect (cider-ensure-op-supported "foo")
:to-throw 'user-error)))
(describe "cider-expected-ns"
diff --git a/test/cider-interaction-tests.el b/test/cider-interaction-tests.el
index 0681861c..e59c2c0b 100644
--- a/test/cider-interaction-tests.el
+++ b/test/cider-interaction-tests.el
@@ -58,47 +58,47 @@
(describe "cider-refresh"
(it "raises a user error if cider is not connected"
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-refresh)) :to-throw 'user-error)))
+ (expect (cider-refresh) :to-throw 'user-error)))
(describe "cider-quit"
(it "raises a user error if cider is not connected"
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-quit)) :to-throw 'user-error)))
+ (expect (cider-quit) :to-throw 'user-error)))
(describe "cider-restart"
(it "raises a user error if cider is not connected"
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-restart)) :to-throw 'user-error)))
+ (expect (cider-restart) :to-throw 'user-error)))
(describe "cider-find-ns"
(it "raises a user error if cider is not connected"
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-find-ns)) :to-throw 'user-error))
+ (expect (cider-find-ns) :to-throw 'user-error))
(it "raises a user error if the op is not supported"
(spy-on 'cider-nrepl-op-supported-p :and-return-value nil)
- (expect (lambda () (cider-find-ns)) :to-throw 'user-error)))
+ (expect (cider-find-ns) :to-throw 'user-error)))
(describe "cider-load-all-project-ns"
(it "raises a user error if cider is not connected"
(spy-on 'cider-connected-p :and-return-value nil)
- (expect (lambda () (cider-load-all-project-ns)) :to-throw 'user-error))
+ (expect (cider-load-all-project-ns) :to-throw 'user-error))
(it "raises a user error if the op is not supported"
(spy-on 'cider-nrepl-op-supported-p :and-return-value nil)
- (expect (lambda () (cider-load-all-project-ns)) :to-throw 'user-error)))
+ (expect (cider-load-all-project-ns) :to-throw 'user-error)))
(describe "cider-load-file"
- (it "works as expected in empty Clojure buffers"
- (spy-on 'cider-request:load-file :and-return-value nil)
- (with-connection-buffer "clj" b
- (with-temp-buffer
- (clojure-mode)
- (setq buffer-file-name (make-temp-name "tmp.clj"))
- (expect (lambda () (cider-load-buffer)) :not :to-throw)))))
+ (it "works as expected in empty Clojure buffers"
+ (spy-on 'cider-request:load-file :and-return-value nil)
+ (with-connection-buffer "clj" b
+ (with-temp-buffer
+ (clojure-mode)
+ (setq buffer-file-name (make-temp-name "tmp.clj"))
+ (expect (cider-load-buffer) :not :to-throw)))))
(describe "cider-interactive-eval"
- (it "works as expected in empty Clojure buffers"
- (spy-on 'cider-nrepl-request:eval :and-return-value nil)
- (with-connection-buffer "clj" b
- (with-temp-buffer
- (clojure-mode)
- (expect (lambda () (cider-interactive-eval "(+ 1)")) :not :to-throw)))))
+ (it "works as expected in empty Clojure buffers"
+ (spy-on 'cider-nrepl-request:eval :and-return-value nil)
+ (with-connection-buffer "clj" b
+ (with-temp-buffer
+ (clojure-mode)
+ (expect (cider-interactive-eval "(+ 1)") :not :to-throw)))))