Skip to content

Instantly share code, notes, and snippets.

@kretes
Created May 21, 2014 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kretes/ca5bf6b5385eadfc182b to your computer and use it in GitHub Desktop.
Save kretes/ca5bf6b5385eadfc182b to your computer and use it in GitHub Desktop.
def check(sysEnvKey: String, execute: () => Unit) =
sys.env.keys.find(_ == sysEnvKey).foreach(a => execute())
"env" should {
"be printes" in {
check("JAVA_HOME",() => println("exists"))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment