trivago / Dobby

Swift helpers for mocking and stubbing
Apache License 2.0
165 stars 14 forks source link

Void enhancements #30

Open felixvisee opened 8 years ago

felixvisee commented 8 years ago

Mocks and Stubs with Void interactions require some unnecessary typing, like:

let stub: Stub<(), Int> = Stub()
stub.on(any(), returnValue: 42)

We could add appropriate protocols, MockType and StubType, and extensions for where Interaction == Void to provide:

let stub: Stub<(), Int> = Stub()
stub.returnValue(42)