Cuckoo/Source/Stubbing/StubFunction/Trait/StubFunctionThenDoNothingTr...

20 lines
482 B
Swift

//
// StubFunctionThenDoNothingTrait.swift
// Cuckoo
//
// Created by Filip Dolnik on 27.06.16.
// Copyright © 2016 Brightify. All rights reserved.
//
public protocol StubFunctionThenDoNothingTrait: BaseStubFunctionTrait {
/// Does nothing when invoked.
func thenDoNothing() -> Self
}
public extension StubFunctionThenDoNothingTrait where OUT == Void {
func thenDoNothing() -> Self {
stub.appendAction(.ReturnValue(Void()))
return self
}
}