Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PassthroughSubject created without combine annotation #184

Closed
sidepelican opened this issue Apr 1, 2022 · 3 comments
Closed

PassthroughSubject created without combine annotation #184

sidepelican opened this issue Apr 1, 2022 · 3 comments

Comments

@sidepelican
Copy link
Collaborator

This protocol has no combine annotation, but generated mock has special implementation using 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.

mockolo version: 1.7.0

@maxwellE
Copy link
Collaborator

I created this PR #186

@maxwellE
Copy link
Collaborator

Merged #186

@sidepelican
Copy link
Collaborator Author

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants