class BatsCore < Formula desc "Bash Automated Testing System" homepage "https://github.com/bats-core/bats-core" url "https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz" sha256 "855d8b8bed466bc505e61123d12885500ef6fcdb317ace1b668087364717ea82" bottle :unneeded conflicts_with "bats", :because => "both install `bats` executables" def install system "./install.sh", prefix end test do (testpath/"test.sh").write <<~EOS @test "addition using bc" { result="$(echo 2+2 | bc)" [ "$result" -eq 4 ] } EOS assert_match "addition", shell_output("#{bin}/bats test.sh") end end