Closed sidepelican closed 2 years ago
This protocol has no combine annotation, but generated mock has special implementation using PassthroughSubject .
combine
PassthroughSubject
source
/// @mockable protocol Foo { var bar: AnyPublisher<Int, Never> { get } }
generated
class FooMock: Foo { init() { } var bar: AnyPublisher<Int, Never> { return self.barSubject.eraseToAnyPublisher() } private(set) var barSubject = PassthroughSubject<Int, Never>() }
I want to set my own AnyPublisher to mock object. It seems that there are no way to disable generating special mock for Combine.
AnyPublisher
mockolo version: 1.7.0
I created this PR https://github.com/uber/mockolo/pull/186
Merged #186
Thank you!!
This protocol has no
combine
annotation, but generated mock has special implementation usingPassthroughSubject
.source
generated
I want to set my own
AnyPublisher
to mock object. It seems that there are no way to disable generating special mock for Combine.mockolo version: 1.7.0