This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-14
Channels
- # architecture (5)
- # beginners (36)
- # boot (3)
- # cider (89)
- # clara (35)
- # cljsrn (6)
- # clojure (123)
- # clojure-dev (15)
- # clojure-italy (9)
- # clojure-nl (14)
- # clojure-spec (11)
- # clojure-uk (192)
- # clojurescript (27)
- # cursive (22)
- # data-science (1)
- # datascript (1)
- # datomic (31)
- # defnpodcast (1)
- # duct (1)
- # emacs (9)
- # fulcro (2)
- # graphql (16)
- # jobs-discuss (10)
- # juxt (1)
- # keechma (7)
- # mount (4)
- # off-topic (83)
- # onyx (8)
- # pedestal (5)
- # portkey (1)
- # re-frame (44)
- # reagent (29)
- # reitit (4)
- # remote-jobs (1)
- # ring-swagger (1)
- # rum (24)
- # shadow-cljs (1)
- # spacemacs (30)
- # tools-deps (6)
- # vim (23)
@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 😞