Software Engineering ยท Testing
A test double that returns fixed, predetermined responses regardless of input, used to isolate the code under test from a real dependency.
Example: A fake payment service that always returns 'success' so you can test the rest of the flow.
In practice: The distinction from a mock matters: a stub just returns canned data, while a mock also lets you assert it was called correctly.