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 2, 2015
1 parent ee6027c commit a928097
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Library/Formula/gjstest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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
# Require C++11 mode, even on OS X versions before 10.9.
ENV.libcxx

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 a928097

Please sign in to comment.