Fork me on GitHub
#mount
<
2016-09-27
>
tianshu13:09:17

Is there any example for continues testing with mount + boot-test?

tolitius14:09:16

@doglooksgood: take a look at these examples: https://github.com/tolitius/stater they are boot based. as far as "continues" testing, I usually do boot watch speak test in a different REPL and all tests run automatically on changes

tianshu14:09:40

(deftask run-tests []
  (set-env! :source-paths #(conj % "test/server"))
  (mount/start)
  (comp (watch)
        (speak)
        (test)))
I wonder where should I call mount/start

tianshu14:09:57

I want to use boot run-tests in terminal to start testing.

tolitius14:09:56

usually you would have calls to (mount/start) within the tests, so you can just do: https://github.com/tolitius/mount/blob/master/build.boot#L73-L75

tolitius14:09:10

since you are testing certain parts of an app

tolitius14:09:33

where tests would start / stop parts of the app, or the whole app, depending on what needs to be tested: https://github.com/tolitius/mount/blob/master/test/core/mount/test/start_with.cljc#L25-L32

tianshu15:09:05

Got it, thanks very much!

tolitius15:09:25

sure, very welcome

deactivateduser23:09:41

Just to follow up from yesterday (thanks again @dm3 and @tolitius!), it ended up being super simple to use CLI options with cprop & mount.

deactivateduser23:09:40

And here's where the config file specified on the command line ends up: https://github.com/pmonks/bot-unfurl/blob/master/src/bot_unfurl/config.clj#L21

deactivateduser23:09:50

From there on, it's vanilla mount all the way down!