Avoiding Test Data Mutation

Say we have a service object, with a dependency injected. The service performs an operation with data obtained from the dependency. For simplicity in this example, let’s say the service would wrap the data into a response hash, with keys success indicating successful operation and data containing the result »