Skip to content

Commit b135ce1

Browse files
authored
Merge pull request #135 from DarinDouglass/mount-v2
[#126] Remove mount/args support
2 parents 9dd8535 + 741966c commit b135ce1

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

src/formatting_stack/mount.clj

+1-11
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,5 @@
1212
(apply format!))
1313
this)
1414

15-
;; Allow parameterless configuring using `mount/start-with-args`.
16-
(mount-up/on-up :formatting-with-mount-args
17-
(fn [_]
18-
(when-let [config (::config (mount/args))]
19-
(start config)))
20-
:before)
21-
2215
(defn configure! [config]
23-
(mount-up/on-up :formatting-with-provided-config
24-
(fn [_]
25-
(start config))
26-
:before))
16+
(mount-up/on-up :formatting (fn [_] (start config)) :before))

test/functional/formatting_stack/mount.clj

-17
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,3 @@
4141
(is (= [sample-report]
4242
@p)))
4343
(mount/stop))))
44-
45-
(deftest works-with-mount-args
46-
(testing "It can be started/stopped without errors"
47-
(let [p (atom nil)
48-
;; pass an empty stack (except for the `proof`), so that no side-effects will be triggered (would muddy the test suite):
49-
opts {:strategies []
50-
:third-party-indent-specs {}
51-
:formatters []
52-
:linters [(proof p)]
53-
:processors []
54-
:in-background? false
55-
:reporter (reporters.passthrough/new)}]
56-
(mount/start-with-args {:formatting-stack.mount/config opts})
57-
(testing "It actually runs its members, such as linters"
58-
(is (= [sample-report]
59-
@p)))
60-
(mount/stop))))

0 commit comments

Comments
 (0)