Fork me on GitHub
#mount
<
2018-05-14
>
tolitius15:05:59

@poulin_julien try it from REPL. might be something with MockGenerator. call or could be you calling it :once vs. :each, but REPL should reveal what does not go the way you expect it. Here is an example:

tolitius15:05:07

boot.user=> (require '[mount.core :as mount :refer [defstate only swap-states]])
nil
boot.user=> (defstate a :start 42)
#'boot.user/a
boot.user=> (defstate b :start 34)
#'boot.user/b
boot.user=> (defstate c :start 28)
#'boot.user/c
nil
boot.user=> (-> (only [#'boot.user/a #'boot.user/b])
                (swap-states {#'boot.user/a {:start (fn [] 132)}})
                mount/start)
{:started ["#'boot.user/a" "#'boot.user/b"]}
boot.user=> a
132
boot.user=> b
34

Julien Poulin10:05:09

OK, I found the problem and it had nothing to do with how I set up the test. It was just my own stupidity. Sorry for wasting your time 😞

tolitius12:05:01

not a problem. glad it works 🙂