Skip to content

Commit

Permalink
Move forEach to BlockingObservable
Browse files Browse the repository at this point in the history
- was missed in previous refactoring
  • Loading branch information
benjchristensen committed May 16, 2013
1 parent 0a96f2e commit 68a0527
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/groovy/rx/lang/groovy/ObservableTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def class ObservableTests {

@Test
public void testForEach() {
Observable.create(new AsyncObservable()).forEach({ result -> a.received(result)});
Observable.create(new AsyncObservable()).toBlockingObservable().forEach({ result -> a.received(result)});
verify(a, times(1)).received(1);
verify(a, times(1)).received(2);
verify(a, times(1)).received(3);
Expand All @@ -237,7 +237,7 @@ def class ObservableTests {
@Test
public void testForEachWithError() {
try {
Observable.create(new AsyncObservable()).forEach({ result -> throw new RuntimeException('err')});
Observable.create(new AsyncObservable()).toBlockingObservable().forEach({ result -> throw new RuntimeException('err')});
fail("we expect an exception to be thrown");
}catch(Exception e) {
// do nothing as we expect this
Expand Down

0 comments on commit 68a0527

Please sign in to comment.