bats-core 0.4.0 (new formula)
This commit is contained in:
parent
3d822c7944
commit
6a0c0228b4
1 changed files with 24 additions and 0 deletions
24
Formula/bats-core.rb
Normal file
24
Formula/bats-core.rb
Normal 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
|
Loading…
Reference in a new issue