From bf604583786dc141c159df6cb656ec2cb25d3a58 Mon Sep 17 00:00:00 2001 From: Mairbek Khadikov Date: Mon, 4 Mar 2013 21:17:32 +0200 Subject: [PATCH] Reimplemented Last operation --- src/main/scala/rx/lang/scala/ScalaAdaptor.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/rx/lang/scala/ScalaAdaptor.scala b/src/main/scala/rx/lang/scala/ScalaAdaptor.scala index 5555b512..584c7c58 100644 --- a/src/main/scala/rx/lang/scala/ScalaAdaptor.scala +++ b/src/main/scala/rx/lang/scala/ScalaAdaptor.scala @@ -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)