Created
February 29, 2016 16:30
-
-
Save ygorbarboza/a2a559d53c13c7327b20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RxJavaTestRunner extends MockitoJUnitRunner { | |
// private static final TestScheduler SCHEDULER = new TestScheduler(); | |
public RxJavaTestRunner(Class<?> klass) throws InvocationTargetException { | |
super(klass); | |
RxAndroidPlugins.getInstance().reset(); | |
RxAndroidPlugins.getInstance().registerSchedulersHook(new RxAndroidSchedulersHook() { | |
@Override | |
public Scheduler getMainThreadScheduler() { | |
return Schedulers.testScheduler(); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment