Skip to content

Commit

Permalink
Convert 'last' from non-blocking to blocking to match Rx.Net
Browse files Browse the repository at this point in the history
See ReactiveX/RxJava#57 (comment) for background.

NOTE: This is a breaking change thus we are bumping the version from 0.5.x to 0.6.x

Manual merge of branch 'last' of git://github.com/mairbek/RxJava into issue-57-last

Conflicts:
	rxjava-core/src/main/java/rx/Observable.java
  • Loading branch information
benjchristensen committed Mar 12, 2013
2 parents 041ba2f + 6af1f45 commit be67385
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ class UnitTestSuite extends JUnitSuite {
verify(assertion, times(1)).received(List(2,4,6,8))
}

@Test def testLast() {
@Test def testTakeLast() {
val numbers = Observable.toObservable[Int](1, 2, 3, 4, 5, 6, 7, 8, 9)
numbers.last().subscribe((callback: Int) => {
println("testLast: onNext -> got " + callback)
numbers.takeLast(1).subscribe((callback: Int) => {
println("testTakeLast: onNext -> got " + callback)
assertion.received(callback)
})
verify(assertion, times(1)).received(9)
Expand Down

0 comments on commit be67385

Please sign in to comment.