Fork me on GitHub

I’m new to mount and am used to Integrant so maybe I’m missing something super obvious here, bear with me! 😄 I’m trying to add an alternative implementation of a state for testing in an existing application. Throughout the codebase we have references, via an ‘API’ ‘getter’ function, that pulls from the var that defstate creates. If I swap out the state in tests that var is now empty so the ‘getter’ function returns nil. Is the mistake the ‘getter’ function… should something else have been used? If I add logic to that getter I’m now bringing in testing concerns into that code which, while admittedly small, doesn’t site right with my existing sensibilities!


It seems to me at first glance that the coupling of state to namespaces is an odd choice from the perspective of someone used to Integrant


…I guess Integrant does the exact same thing, only in that case it’s easy to walk the state/system tree and change the source and destination for states in your tests