diff options
| author | Mike Naberezny | 2014-02-17 18:02:09 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-17 19:21:04 -0800 |
| commit | d91b4db8007cbe76823bbb33df219738d7647d8b (patch) | |
| tree | ae855951985138bcac40a71ef1663d341c4299eb /Library | |
| parent | ce3744b3602b6a9def7c68b167bec4296f51b498 (diff) | |
| download | homebrew-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.rb | 12 |
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 |
