@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:
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
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 😞
not a problem. glad it works 🙂