emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/cider 5425f4eeac 3/3: Fix a bunch of jack-in tests


From: ELPA Syncer
Subject: [nongnu] elpa/cider 5425f4eeac 3/3: Fix a bunch of jack-in tests
Date: Sun, 13 Feb 2022 04:58:27 -0500 (EST)

branch: elpa/cider
commit 5425f4eeacdc693adeb9659980f5ccf3b80ccc69
Author: Bozhidar Batsov <bozhidar@batsov.dev>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>

    Fix a bunch of jack-in tests
---
 test/cider-tests.el | 48 ++++++++++++++++++++++--------------------------
 1 file changed, 22 insertions(+), 26 deletions(-)

diff --git a/test/cider-tests.el b/test/cider-tests.el
index c91909bf85..d88b894a0b 100644
--- a/test/cider-tests.el
+++ b/test/cider-tests.el
@@ -112,17 +112,17 @@
   (describe "when there is a single dependency"
     (before-each
       (setq-local cider-jack-in-dependencies '(("nrepl/nrepl" "0.5.3")))
+      (setq-local cider-injected-middleware-version "0.28.1")
       (setq-local cider-jack-in-nrepl-middlewares 
'("cider.nrepl/cider-middleware"))
-      (setq-local cider-jack-in-lein-plugins '(("cider/cider-nrepl" 
"0.10.0-SNAPSHOT")))
       (setq-local cider-jack-in-dependencies-exclusions '())
       (setq-local cider-enrich-classpath t))
 
     (it "can inject dependencies in a lein project"
       (expect (cider-inject-jack-in-dependencies "" "repl :headless" 'lein)
               :to-equal (concat "update-in :dependencies conj "
-                                (shell-quote-argument "[nrepl/nrepl 
\"0.5.3\"]")
+                                (shell-quote-argument "[nrepl/nrepl 
\"0.28.1\"]")
                                 " -- update-in :plugins conj "
-                                (shell-quote-argument "[cider/cider-nrepl 
\"0.10.0-SNAPSHOT\"]")
+                                (shell-quote-argument "[cider/cider-nrepl 
\"0.28.1\"]")
                                 " -- update-in :plugins conj "
                                 (shell-quote-argument 
"[mx.cider/enrich-classpath \"1.8.0\"]")
                                 " -- update-in :middleware conj 
cider.enrich-classpath/middleware"
@@ -135,7 +135,7 @@
                          "update-in :dependencies conj "
                          (shell-quote-argument "[nrepl/nrepl \"0.5.3\" 
:exclusions [org.clojure/clojure]]")
                          " -- update-in :plugins conj "
-                         (shell-quote-argument "[cider/cider-nrepl 
\"0.10.0-SNAPSHOT\"]")
+                         (shell-quote-argument "[cider/cider-nrepl 
\"0.28.1\"]")
                          " -- update-in :plugins conj "
                          (shell-quote-argument "[mx.cider/enrich-classpath 
\"1.8.0\"]")
                          " -- update-in :middleware conj 
cider.enrich-classpath/middleware"
@@ -147,7 +147,7 @@
               :to-equal (concat "update-in :dependencies conj "
                                 (shell-quote-argument "[nrepl/nrepl \"0.5.3\" 
:exclusions [org.clojure/clojure foo.bar/baz]]")
                                 " -- update-in :plugins conj "
-                                (shell-quote-argument "[cider/cider-nrepl 
\"0.10.0-SNAPSHOT\"]")
+                                (shell-quote-argument "[cider/cider-nrepl 
\"0.28.1\"]")
                                 " -- update-in :plugins conj "
                                 (shell-quote-argument 
"[mx.cider/enrich-classpath \"1.8.0\"]")
                                 " -- update-in :middleware conj 
cider.enrich-classpath/middleware"
@@ -160,7 +160,7 @@
                          " -d "
                          (shell-quote-argument "nrepl/nrepl:0.5.3")
                          " -d "
-                         (shell-quote-argument 
"cider/cider-nrepl:0.10.0-SNAPSHOT")
+                         (shell-quote-argument "cider/cider-nrepl:0.28.1")
                          " cider.tasks/add-middleware"
                          " -m "
                          (shell-quote-argument "cider.nrepl/cider-middleware")
@@ -182,7 +182,7 @@
                                 " -- update-in :plugins conj "
                                 (shell-quote-argument "[refactor-nrepl 
\"2.0.0\"]")
                                 " -- update-in :plugins conj "
-                                (shell-quote-argument "[cider/cider-nrepl 
\"0.11.0\"]")
+                                (shell-quote-argument "[cider/cider-nrepl 
\"0.28.1\"]")
                                 " -- update-in :plugins conj "
                                 (shell-quote-argument 
"[mx.cider/enrich-classpath \"1.8.0\"]")
                                 " -- update-in :middleware conj 
cider.enrich-classpath/middleware"
@@ -196,7 +196,7 @@
                                 " -d "
                                 (shell-quote-argument "refactor-nrepl:2.0.0")
                                 " -d "
-                                (shell-quote-argument 
"cider/cider-nrepl:0.11.0")
+                                (shell-quote-argument 
"cider/cider-nrepl:0.28.1")
                                 " cider.tasks/add-middleware"
                                 " -m "
                                 (shell-quote-argument 
"refactor-nrepl.middleware/wrap-refactor")
@@ -208,14 +208,13 @@
     (before-each
       (setq-local cider-jack-in-dependencies '(("nrepl/nrepl" "0.5.3")))
       (setq-local cider-jack-in-nrepl-middlewares 
'("cider.nrepl/cider-middleware"))
-      (setq-local cider-jack-in-lein-plugins '(("cider/cider-nrepl" "0.11.0")))
       (setq-local cider-jack-in-dependencies-exclusions '()))
     (it "can concat in a lein project"
       (expect (cider-inject-jack-in-dependencies "-o -U" "repl :headless" 
'lein)
               :to-equal (concat "-o -U update-in :dependencies conj "
                                 (shell-quote-argument "[nrepl/nrepl 
\"0.5.3\"]")
                                 " -- update-in :plugins conj "
-                                (shell-quote-argument "[cider/cider-nrepl 
\"0.11.0\"]")
+                                (shell-quote-argument "[cider/cider-nrepl 
\"0.28.1\"]")
                                 " -- update-in :plugins conj "
                                 (shell-quote-argument 
"[mx.cider/enrich-classpath \"1.8.0\"]")
                                 " -- update-in :middleware conj 
cider.enrich-classpath/middleware"
@@ -226,7 +225,7 @@
                                 " -d "
                                 (shell-quote-argument "nrepl/nrepl:0.5.3")
                                 " -d "
-                                (shell-quote-argument 
"cider/cider-nrepl:0.11.0")
+                                (shell-quote-argument 
"cider/cider-nrepl:0.28.1")
                                 " cider.tasks/add-middleware"
                                 " -m "
                                 (shell-quote-argument 
"cider.nrepl/cider-middleware")
@@ -241,18 +240,18 @@
     (before-each
       (fset 'plugins-predicate (lambda (&rest _) t))
       (fset 'middlewares-predicate (lambda (&rest _) t))
-      (setq-local cider-jack-in-lein-plugins '(("refactor-nrepl" "2.0.0" 
:predicate plugins-predicate) ("cider/cider-nrepl" "0.11.0")))
+      (setq-local cider-jack-in-lein-plugins '(("refactor-nrepl" "2.0.0" 
:predicate plugins-predicate)))
       (setq-local cider-jack-in-nrepl-middlewares 
'(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) 
"cider.nrepl/cider-middleware" ("another/middleware"))))
     (it "includes plugins whose predicates return true"
       (expect (cider-jack-in-normalized-lein-plugins)
-              :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" 
"0.11.0"))))
+              :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" 
"0.28.1"))))
     (it "includes middlewares whose predicates return true"
       (expect (cider-jack-in-normalized-nrepl-middlewares)
               :to-equal '("refactor-nrepl.middleware/wrap-refactor" 
"cider.nrepl/cider-middleware" "another/middleware")))
     (it "ignores plugins whose predicates return false"
       (spy-on 'plugins-predicate :and-return-value nil)
       (expect (cider-jack-in-normalized-lein-plugins)
-              :to-equal '(("cider/cider-nrepl" "0.11.0")))
+              :to-equal '(("cider/cider-nrepl" "0.28.1")))
       (spy-on 'middlewares-predicate :and-return-value nil)
       (expect (cider-jack-in-normalized-nrepl-middlewares)
               :to-equal '("cider.nrepl/cider-middleware" 
"another/middleware")))
@@ -281,7 +280,7 @@
               :and-return-value '("refactor-nrepl.middleware/wrap-refactor" 
"cider.nrepl/cider-middleware"))
       (spy-on 'cider-jack-in-normalized-lein-plugins
               :and-return-value '(("refactor-nrepl" "2.0.0")
-                                  ("cider/cider-nrepl" "0.11.0")
+                                  ("cider/cider-nrepl" "0.28.1")
                                   ("mx.cider/enrich-classpath" "1.8.0")))
       (setq-local cider-jack-in-dependencies-exclusions '()))
     (it "uses them in a lein project"
@@ -291,19 +290,17 @@
                                 " -- update-in :plugins conj "
                                 (shell-quote-argument "[refactor-nrepl 
\"2.0.0\"]")
                                 " -- update-in :plugins conj "
-                                (shell-quote-argument "[cider/cider-nrepl 
\"0.11.0\"]")
+                                (shell-quote-argument "[cider/cider-nrepl 
\"0.28.1\"]")
                                 " -- update-in :plugins conj "
                                 (shell-quote-argument 
"[mx.cider/enrich-classpath \"1.8.0\"]")
                                 " -- update-in :middleware conj 
cider.enrich-classpath/middleware"
                                 " -- repl :headless"))))
 
-  (describe "when the middleware and plugin lists have been normalized (Boot)"
+  (describe "when the middleware lists have been normalized (Boot)"
     (before-each
       (spy-on 'cider-jack-in-normalized-nrepl-middlewares
               :and-return-value '("refactor-nrepl.middleware/wrap-refactor" 
"cider.nrepl/cider-middleware"))
-      (spy-on 'cider-jack-in-normalized-lein-plugins
-              :and-return-value '(("refactor-nrepl" "2.0.0")
-                                  ("cider/cider-nrepl" "0.11.0")))
+      (setq-local cider-jack-in-dependencies ("refactor-nrepl" "2.0.0"))
       (setq-local cider-jack-in-dependencies-exclusions '()))
     (it "uses them in a boot project"
       (expect (cider-inject-jack-in-dependencies "" "repl -s wait" 'boot)
@@ -313,7 +310,7 @@
                                 " -d "
                                 (shell-quote-argument "refactor-nrepl:2.0.0")
                                 " -d "
-                                (shell-quote-argument 
"cider/cider-nrepl:0.11.0")
+                                (shell-quote-argument 
"cider/cider-nrepl:0.28.1")
                                 " cider.tasks/add-middleware"
                                 " -m "
                                 (shell-quote-argument 
"refactor-nrepl.middleware/wrap-refactor")
@@ -396,10 +393,9 @@
   (describe "when 'clojure-cli project type"
     (it "uses main opts in an alias to prevent other mains from winning"
       (setq-local cider-jack-in-dependencies '(("nrepl/nrepl" "0.8.3")))
-      (setq-local cider-jack-in-lein-plugins '(("cider/cider-nrepl" "0.25.7")))
       (setq-local cider-jack-in-nrepl-middlewares 
'("cider.nrepl/cider-middleware"))
       (let ((expected (string-join '("clojure -Sdeps '{:deps {nrepl/nrepl 
{:mvn/version \"0.8.3\"} "
-                                     "cider/cider-nrepl {:mvn/version 
\"0.25.7\"}} "
+                                     "cider/cider-nrepl {:mvn/version 
\"0.28.1\"}} "
                                      ":aliases {:cider/nrepl {:main-opts 
[\"-m\" \"nrepl.cmdline\" \"--middleware\""
                                      " \"[cider.nrepl/cider-middleware]\"]}}}' 
-M:cider/nrepl")
                                    "")))
@@ -413,7 +409,7 @@
                 :to-equal expected)))
     (it "allows specifying custom aliases with `cider-clojure-cli-aliases`"
       (let ((expected (string-join '("clojure -Sdeps '{:deps {nrepl/nrepl 
{:mvn/version \"0.8.3\"} "
-                                     "cider/cider-nrepl {:mvn/version 
\"0.25.7\"}} "
+                                     "cider/cider-nrepl {:mvn/version 
\"0.28.1\"}} "
                                      ":aliases {:cider/nrepl {:main-opts 
[\"-m\" \"nrepl.cmdline\" \"--middleware\""
                                      " \"[cider.nrepl/cider-middleware]\"]}}}' 
-M:dev:test:cider/nrepl")
                                    "")))
@@ -427,7 +423,7 @@
                 :to-equal expected)))
     (it "handles aliases correctly"
       (let ((expected (string-join '("-Sdeps '{:deps {nrepl/nrepl 
{:mvn/version \"0.8.3\"} "
-                                     "cider/cider-nrepl {:mvn/version 
\"0.25.7\"}} "
+                                     "cider/cider-nrepl {:mvn/version 
\"0.28.1\"}} "
                                      ":aliases {:cider/nrepl {:main-opts 
[\"-m\" \"nrepl.cmdline\" \"--middleware\""
                                      " \"[cider.nrepl/cider-middleware]\"]}}}' 
-M:test:cider/nrepl")
                                    ""))
@@ -450,7 +446,7 @@
                     :to-equal expected)))))
     (it "allows for global options"
       (let ((expected (string-join '("-J-Djdk.attach.allowAttachSelf -Sdeps 
'{:deps {nrepl/nrepl {:mvn/version \"0.8.3\"} "
-                                     "cider/cider-nrepl {:mvn/version 
\"0.25.7\"}} "
+                                     "cider/cider-nrepl {:mvn/version 
\"0.28.1\"}} "
                                      ":aliases {:cider/nrepl {:main-opts 
[\"-m\" \"nrepl.cmdline\" \"--middleware\""
                                      " \"[cider.nrepl/cider-middleware]\"]}}}' 
-M:test:cider/nrepl")
                                    ""))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]