Skip to content

Commit

Permalink
bats-core 0.4.0 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
btamayo authored and ilovezfs committed Jun 14, 2018
1 parent 2672d00 commit 24304ff
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Formula/bats-core.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 24304ff

Please sign in to comment.