aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike Naberezny2014-02-17 18:02:09 -0800
committerAdam Vandenberg2014-02-17 19:21:04 -0800
commitd91b4db8007cbe76823bbb33df219738d7647d8b (patch)
treeae855951985138bcac40a71ef1663d341c4299eb /Library
parentce3744b3602b6a9def7c68b167bec4296f51b498 (diff)
downloadhomebrew-d91b4db8007cbe76823bbb33df219738d7647d8b.tar.bz2
phantomjs: add test
Closes #26801. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/phantomjs.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/phantomjs.rb b/Library/Formula/phantomjs.rb
index 282e6a510..987d8882a 100644
--- a/Library/Formula/phantomjs.rb
+++ b/Library/Formula/phantomjs.rb
@@ -28,4 +28,16 @@ class Phantomjs < Formula
bin.install 'bin/phantomjs'
(share+'phantomjs').install 'examples'
end
+
+ test do
+ path = testpath/"test.js"
+ path.write <<-EOS
+ console.log('hello');
+ phantom.exit();
+ EOS
+
+ output = `#{bin}/phantomjs #{path}`.strip
+ assert_equal "hello", output
+ assert_equal 0, $?.exitstatus
+ end
end