Fix some of the tests.
This commit is contained in:
parent
a2d2b92d01
commit
22b427aca1
3 changed files with 13 additions and 12 deletions
|
@ -64,7 +64,7 @@
|
|||
"description is included")
|
||||
(is (= nil (first-in xml [:project :mailingLists]))
|
||||
"no mailing list")
|
||||
(is (= ["central" "clojars" "snapshots"]
|
||||
(is (= ["central" "clojars" "other"]
|
||||
(map #(first-in % [:repository :id])
|
||||
(deep-content xml [:project :repositories])))
|
||||
"repositories are named")
|
||||
|
|
|
@ -4,21 +4,21 @@
|
|||
|
||||
(deftest test-options-for-reply-empty
|
||||
(let [project {}]
|
||||
(is (= {:attach "localhost:9876"
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:custom-init nil}
|
||||
(options-for-reply project :attach 9876)))))
|
||||
|
||||
(deftest test-options-for-reply-host
|
||||
(let [project {:repl-options {:host "127.0.0.1"}}]
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:host "127.0.0.1"
|
||||
(let [project {:repl-options {:host "192.168.0.10"}}]
|
||||
(is (= {:attach "192.168.0.10:9876"
|
||||
:host "192.168.0.10"
|
||||
:custom-init nil}
|
||||
(options-for-reply project :attach 9876)))))
|
||||
|
||||
(deftest test-options-for-reply-prompt
|
||||
(let [prompt-fn (fn [ns] "hi ")
|
||||
project {:repl-options {:prompt prompt-fn}}]
|
||||
(is (= {:attach "localhost:9876"
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:custom-prompt prompt-fn
|
||||
:custom-init nil}
|
||||
(options-for-reply project :attach 9876)))))
|
||||
|
@ -26,13 +26,13 @@
|
|||
(deftest test-options-for-reply-init
|
||||
(let [init-form '(println "ohai")
|
||||
project {:repl-options {:init init-form}}]
|
||||
(is (= {:attach "localhost:9876"
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:custom-init init-form}
|
||||
(options-for-reply project :attach 9876)))))
|
||||
|
||||
(deftest test-options-for-reply-init-ns
|
||||
(let [project {:repl-options {:init-ns 'foo.core}}]
|
||||
(is (= {:attach "localhost:9876"
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:init-ns 'foo.core
|
||||
:custom-init '(do (clojure.core/require 'foo.core)
|
||||
(clojure.core/in-ns 'foo.core)
|
||||
|
@ -41,7 +41,7 @@
|
|||
|
||||
(deftest test-options-for-reply-init-ns-and-init
|
||||
(let [project {:repl-options {:init-ns 'foo.core :init '(println "ohai")}}]
|
||||
(is (= {:attach "localhost:9876"
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:init-ns 'foo.core
|
||||
:custom-init '(do (clojure.core/require 'foo.core)
|
||||
(clojure.core/in-ns 'foo.core)
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
(deftest test-options-for-reply-main-ns
|
||||
(let [project {:main 'foo.core}]
|
||||
(is (= {:attach "localhost:9876"
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:custom-init '(do (clojure.core/require 'foo.core)
|
||||
(clojure.core/in-ns 'foo.core)
|
||||
nil)}
|
||||
|
@ -58,7 +58,7 @@
|
|||
|
||||
(deftest test-options-for-reply-init-ns-beats-main
|
||||
(let [project {:main 'foo.core :repl-options {:init-ns 'winner.here}}]
|
||||
(is (= {:attach "localhost:9876"
|
||||
(is (= {:attach "127.0.0.1:9876"
|
||||
:init-ns 'winner.here
|
||||
:custom-init '(do (clojure.core/require 'winner.here)
|
||||
(clojure.core/in-ns 'winner.here)
|
||||
|
|
|
@ -23,5 +23,6 @@
|
|||
:default (complement :integration)
|
||||
:random (fn [_] (> (rand) ~(float 1/2)))
|
||||
:all (constantly true)}
|
||||
:deploy-repositories {"snapshots" ~(format "file://%s/lein-repo"
|
||||
:repositories {"other" "http://example.com/repo"}
|
||||
:deploy-repositories {"snapshots" ~(format "file://%s/lein-snapshots"
|
||||
(System/getProperty "java.io.tmpdir"))})
|
||||
|
|
Loading…
Reference in a new issue