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/2.0.1/2.13-2.0.1" sha256 "7ca90c6c181f2479da81e92463571ba6b6994ba2c0675fb040843534c487b3ac" bottle :unneeded depends_on :java => "1.8+" def install libexec.install Dir["*"].shift => "amm" chmod 0555, libexec/"amm" bin.install_symlink libexec/"amm" end test do output = shell_output("#{bin}/amm -c 'print(\"hello world!\")'") assert_equal "hello world!", output.lines.last end end