Skip to content

Instantly share code, notes, and snippets.

@trevorrjohn
Created November 10, 2015 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorrjohn/14c6bb34c7e97918c7a5 to your computer and use it in GitHub Desktop.
Save trevorrjohn/14c6bb34c7e97918c7a5 to your computer and use it in GitHub Desktop.
PublishSubject<Repo> subject =
PublishSubject.create();
when(service.getRepo(anyString())
.thenReturn(subject.asObservable());
activity.onCreate(null);
subject.onNext(new Repo("Subject!"));
assertThat(repoView).hasText("Subject!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment