diff options
| author | Mike Naberezny | 2014-04-01 11:57:00 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2014-04-01 14:09:51 -0500 |
| commit | fa3183b08c558f321aac98c7459def0449309a3f (patch) | |
| tree | acc2a80cb3a1fc51ca11701dd005179b47794684 /Library/Formula | |
| parent | 8abcc8bfa7a92f72978c399d8c6ff6571f11d2f4 (diff) | |
| download | homebrew-fa3183b08c558f321aac98c7459def0449309a3f.tar.bz2 | |
visitors: add test
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/visitors.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Formula/visitors.rb b/Library/Formula/visitors.rb index 7d6b36517..7db6eac7c 100644 --- a/Library/Formula/visitors.rb +++ b/Library/Formula/visitors.rb @@ -12,4 +12,13 @@ class Visitors < Formula bin.install "visitors" man1.install "visitors.1" end + + test do + IO.popen("#{bin}/visitors - -o text 2>&1", "w+") do |pipe| + pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:00 -0400] "GET /1 HTTP/1.1" 200 9 - -' + pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:01 -0400] "GET /2 HTTP/1.1" 200 9 - -' + pipe.close_write + assert pipe.read.include?("Different pages requested: 2") + end + end end |
