Closed huy-le closed 6 years ago
I think that is expected because PublishSubject
doesn't replay events. I don't think you can test PublishSubject
with RxBlocking directly. You can see how it's tested here.
@biboran Thanks, I thought that it behaves same.
Short description of the issue:
I'd like to test a PublishSubject to know how many events it published. However, the RxBlocking & RxTest doesn't help. It always returns nil.
Expected outcome:
result.count > 0
What actually happens:
result.count == 0
Self contained code example that reproduces the issue:
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
3.6.1
Platform/Environment
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
Xcode version:
:warning: Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. :warning:
Installation method:
I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)
Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)