Skip to content

Instantly share code, notes, and snippets.

@tarla
Last active October 8, 2015 01:28
Show Gist options
  • Save tarla/a2671a1d9d094e46a031 to your computer and use it in GitHub Desktop.
Save tarla/a2671a1d9d094e46a031 to your computer and use it in GitHub Desktop.
Async Test using Scala Specs 2
...
"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