diff options
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 |
