class AmmoniteRepl < Formula desc "Ammonite is a cleanroom re-implementation of the Scala REPL" homepage "https://lihaoyi.github.io/Ammonite/#Ammonite-REPL" url "https://github.com/lihaoyi/Ammonite/releases/download/0.7.8/0.7.8", :using => :nounzip sha256 "776e3128f7648ea23c36900349a427c5e492d6f3aaae1c8c8c8715884cb86468" bottle :unneeded depends_on :java => "1.7+" def install bin.install Dir["*"].shift => "amm" end test do ENV["_JAVA_OPTIONS"] = "-Duser.home=#{testpath}" output = shell_output("#{bin}/amm -c 'print(\"hello world!\")'") assert_equal "hello world!", output.lines.last end end