From 24304ff95e688e9f31d8a2a7ed51474951fd88fa Mon Sep 17 00:00:00 2001 From: Bianca Tamayo Date: Thu, 14 Jun 2018 00:20:04 -0700 Subject: [PATCH] bats-core 0.4.0 (new formula) --- Formula/bats-core.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Formula/bats-core.rb diff --git a/Formula/bats-core.rb b/Formula/bats-core.rb new file mode 100644 index 0000000000000..bc1a64e04dee4 --- /dev/null +++ b/Formula/bats-core.rb @@ -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