Pick the fix
You need to check that send(to:) was called once with the user's email. Which double?
Hint 1 of 1
You need to inspect how it was called.
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A A spy that records each call and its arguments
Correct. The test asserts on the recorded calls.
Why not the others?
- B A stub. Stubs return answers; they don't record calls.
- C A fake. A fake works like the real thing, but doesn't track calls unless you add that.
- D A dummy. A dummy is never used.