Fork me on GitHub
#luminus
<
2018-04-14
>
ramblurr08:04:45

@yogthos Do you know of any docs or examples that show how to mock/stub components for testing? The components page mentions it as a possibility, but its not a complete example.

ramblurr09:04:21

@sveri ah I see, that's nifty. Are you familiar with the generated luminus template? I'm not sure where to fit something like that in

sveri09:04:06

Nope, last time I used it was like 3 years ago. Sorry

ramblurr09:04:51

For example, luminus starts the components in the tests [like so](https://github.com/mmmanyfold/pb/blob/e6d61fc8716e00960d0a2240556a8bb8cf19a7ce/test/clj/pb/test/handler.clj#L10). I can easily add another component to that start line, but how would I modify it to start env and app as normal with use mount/start-with on the other component

sveri09:04:08

ah, luminus uses mount, I am afraid you cannot use my example then and unfortunately I have not used mount myself extensively.

ramblurr09:04:44

yea, sorry, i was using the component term but it does use mount 😕

yogthos12:04:10

@ramblurr take a look at mount docs, specifically this section https://github.com/tolitius/mount#start-and-stop-parts-of-application

yogthos12:04:55

you can choose what states you start, and you can swap in alternative implementations for testing using start-with