Spies
← Back to Test Doubles
Record calls without changing behavior. The real implementation still executes, but the spy records method calls, arguments, and return values for later assertion. Useful when you want real behavior but need to verify interactions.
Key Properties
Related
- Mocks (replace behavior and verify)