Fork me on GitHub
#mount
<
2021-03-10
>
donavan19:03:00

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!

donavan19:03:47

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

donavan19:03:11

…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