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

Benefit of using RxSchedulersOverrideRule instead of toBlocking #9

Open
akoufa opened this issue Jul 15, 2016 · 1 comment
Open

Benefit of using RxSchedulersOverrideRule instead of toBlocking #9

akoufa opened this issue Jul 15, 2016 · 1 comment

Comments

@akoufa
Copy link

akoufa commented Jul 15, 2016

I would like to know what is the benefit of using the RxSchedulersOverrideRule TestRule instead of the toBlocking? Is it only to avoid attaching toBlocking to every call in every test method? Or the possibility to run the tests on the JVM avoiding the RxAndroid Scheduler?

@akoufa
Copy link
Author

akoufa commented Jul 18, 2016

I saw that you can bypass the package private without needing to rely on reflection using this trick shown at this link http://fedepaol.github.io/blog/2015/09/13/testing-rxjava-observables-subscriptions/ . This guy just creates a class with package name "rx.plugins" and delegates the method call to the now accessible package private method reset().

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

1 participant