|
5 | 5 | [clojure.string :as str]
|
6 | 6 | [clojure.test :refer :all]))
|
7 | 7 |
|
8 |
| -(def ^:private ^{:doc "Can't. See. Me"} private-var [:a :b :c]) |
| 8 | +(def ^:private ^{:doc "Can't. See. Me"} my-private-var [:a :b :c]) |
9 | 9 |
|
10 | 10 | (use-fixtures :each session/session-fixture)
|
| 11 | + |
11 | 12 | (deftest integration-test
|
12 | 13 | (testing "Apropos op, typical case"
|
13 | 14 | (let [response (session/message {:op "apropos" :query "handle-apropos"})
|
|
18 | 19 |
|
19 | 20 | (testing "Apropos op, but specialized cases (invoked with prefix argument)"
|
20 | 21 | (testing "Fails to get a private var because private? unset"
|
21 |
| - (let [response (session/message {:op "apropos" :query "private-var"}) |
| 22 | + (let [response (session/message {:op "apropos" :query "my-private-var"}) |
22 | 23 | match (get-in response [:apropos-matches 0])]
|
23 | 24 | (is (= (:status response) #{"done"}))
|
24 | 25 | (is (empty? match))))
|
25 | 26 |
|
26 | 27 | (testing "Gets a private var using a case insensitive query"
|
27 |
| - (let [response (session/message {:op "apropos" :query "PrIvAtE-VaR" :privates? "t"}) |
| 28 | + (let [response (session/message {:op "apropos" :query "My-Private-Var" :privates? "t"}) |
28 | 29 | match (get-in response [:apropos-matches 0])]
|
29 | 30 | (is (= (:status response) #{"done"}))
|
30 | 31 | (is (= (:type match) "variable"))
|
31 |
| - (is (= (:name match) "cider.nrepl.middleware.apropos-test/private-var")) |
| 32 | + (is (= (:name match) "cider.nrepl.middleware.apropos-test/my-private-var")) |
32 | 33 | (is (= (:doc match) "Can't."))))
|
33 | 34 |
|
34 | 35 | (testing "Fails to get a private var due to case-mismatch in a case sensitive query"
|
35 | 36 | (let [response (session/message {:op "apropos"
|
36 |
| - :query "PrIvAtE-VaR" |
| 37 | + :query "My-Private-Var" |
37 | 38 | :privates? "t"
|
38 | 39 | :case-sensitive? "t"})
|
39 | 40 | match (get-in response [:apropos-matches 0])]
|
|
0 commit comments