jackfirth / racket-mock

Mocking library for Racket
Other
22 stars 7 forks source link

Add function to return a series of values across calls #96

Closed jackfirth closed 7 years ago

jackfirth commented 8 years ago

If a procedure calls a dependency three times, each with different values and each expecting a different result, then the mocked dependency's behavior needs to return different values. A simple procedure like (const-series a b c) that returns a the first time it's called, b the second , c the third, and raises an exception afterwards would be suitable here.