-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Labels
awaiting responseA Cuckoo maintainer is awaiting response from the issue/PR author/community.A Cuckoo maintainer is awaiting response from the issue/PR author/community.help wantedThis issue is asking for a way to solve a problem.This issue is asking for a way to solve a problem.
Description
I'm trying to make getExpositionInfo() to return a value like this
stub(expositionInfoRepository!) { stub in
let expositionInfo = ExpositionInfo(level: .Healthy)
when(stub.getExpositionInfo()).thenReturn(expositionInfo)
}
When the call to the stubbed method is done inside the sut it returns nil
I've been debugging and when setting up the return value:
public extension StubFunctionThenReturnTrait {
@discardableResult
func thenReturn(_ output: OutputType, _ outputs: OutputType...) -> Self {
([output] + outputs).forEach { output in
stub.appendAction(.returnValue(output))
}
return self
}
}
output parameter is always nil, it look like it's overwrited somewhere.
Is there anything wrong with my code?
Regards
Metadata
Metadata
Assignees
Labels
awaiting responseA Cuckoo maintainer is awaiting response from the issue/PR author/community.A Cuckoo maintainer is awaiting response from the issue/PR author/community.help wantedThis issue is asking for a way to solve a problem.This issue is asking for a way to solve a problem.