Skip to content

Commit

Permalink
gjstest 1.0.1 (new formula)
Browse files Browse the repository at this point in the history
There was a gjstest formula in the past, but it stopped building due to
v8 issues and was removed. As of the v8 upgrade in 9dae089, this can
work again.

For google/gjstest#3.
  • Loading branch information
jacobsa committed Sep 1, 2015
1 parent ee6027c commit 4adc52e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Library/Formula/gjstest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class Gjstest < Formula
desc "Fast javascript unit testing framework that runs on the V8 engine."
homepage "https://github.com/google/gjstest"
url "https://github.com/google/gjstest/archive/v1.0.1.tar.gz"
sha256 "c64d1b8d153b9afaa17ce521d9a7d07acbf13838dab7b2e57822f0bf046f80e5"
head "https://github.com/google/gjstest.git"

depends_on "gflags"
depends_on "glog"
depends_on "libxml2"
depends_on "protobuf"
depends_on "re2"
depends_on "v8"

def install
system "make", "PREFIX=#{prefix}", "install"
end

test do
(testpath/"sample_test.js").write <<-EOF
function SampleTest() {
}
registerTestSuite(SampleTest);
addTest(SampleTest, function twoPlusTwoEqualsFour() {
expectEq(4, 2+2);
});
EOF

system "#{bin}/gjstest", "--js_files", "#{testpath}/sample_test.js"
end
end

0 comments on commit 4adc52e

Please sign in to comment.