Closed BenSayers closed 9 years ago
I don't get why mock1 points to 4321. The mockService method should create a completely new instance. I'll merge the PR, and have a look at it.
Yeah, that's not right at all. I did not read the refactor PR properly, and let it though. I will fix that now.
Please grab the latest copy, I have fixed the problem.
I thought about introducing an immutable internal object to represent the current state of MockService but decided that was too complex, and instead opted for a simple fix. Tests are updated and green.
I still think this object needs some work however, as it continues to have unexpected behaviour due to shared state. For example: