mount

tianshu 2016-09-27T13:40:17.000459Z

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

tolitius 2016-09-27T14:31:16.000460Z

@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

tianshu 2016-09-27T14:40:40.000463Z

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

tianshu 2016-09-27T14:40:57.000464Z

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

tolitius 2016-09-27T14:50:56.000465Z

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

tolitius 2016-09-27T14:51:10.000467Z

since you are testing certain parts of an app

tolitius 2016-09-27T14:52:33.000468Z

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

tianshu 2016-09-27T15:07:05.000470Z

Got it, thanks very much!

tolitius 2016-09-27T15:07:25.000471Z

sure, very welcome

2016-09-27T23:04:41.000478Z

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

2016-09-27T23:05:40.000481Z

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

2016-09-27T23:05:50.000483Z

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