bats-core 0.4.0 (new formula)

This commit is contained in:
Bianca Tamayo 2018-06-14 00:20:04 -07:00 committed by ilovezfs
parent 3d822c7944
commit 6a0c0228b4

24
Formula/bats-core.rb Normal file
View file

@ -0,0 +1,24 @@
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.0.1.tar.gz"
sha256 "821626f1e5058a4f25a95722399b460942f27535186a815a279e518b503f8de7"
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