Skip to content

Commit

Permalink
Reimplemented Last operation
Browse files Browse the repository at this point in the history
  • Loading branch information
mairbek committed Mar 4, 2013
1 parent ff5e276 commit bf60458
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/rx/lang/scala/ScalaAdaptor.scala
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 bf60458

Please sign in to comment.