Last active
October 8, 2015 01:28
-
-
Save tarla/a2671a1d9d094e46a031 to your computer and use it in GitHub Desktop.
Async Test using Scala Specs 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
"awesome test" in new WithApplication { | |
/* async */ | |
val x = Future { 1 } | |
x must beEqualTo(1).await | |
/* xgh */ | |
val y = Await.result(Future { 1 }, 10 seconds) | |
y must beEqualTo(1) // whitout .async | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment