Skip to content

Instantly share code, notes, and snippets.

@kretes
Created May 21, 2014 17:44
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/e6aa4c6017a05838a9ec to your computer and use it in GitHub Desktop.
Save kretes/e6aa4c6017a05838a9ec 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