diff options
| author | Mike Naberezny | 2014-02-16 14:56:25 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-16 15:56:52 -0800 |
| commit | ae22ff428049a6dfacfa40ac1c85d82d1aaf9b15 (patch) | |
| tree | 32d229ee306b1e89b05edf3067ddf5516f637deb | |
| parent | 5ad6dcb95109cd1f1cee62f3a73f301f3ed2a9d8 (diff) | |
| download | homebrew-ae22ff428049a6dfacfa40ac1c85d82d1aaf9b15.tar.bz2 | |
scrub: add test
Closes #26778.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/scrub.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/scrub.rb b/Library/Formula/scrub.rb index c2af23a1c..8400ccf11 100644 --- a/Library/Formula/scrub.rb +++ b/Library/Formula/scrub.rb @@ -15,6 +15,16 @@ class Scrub < Formula "--prefix=#{prefix}" system "make install" end + + test do + path = testpath/"foo.txt" + path.write "foo" + + output = `#{bin}/scrub -r -p dod #{path}` + assert output.include?("scrubbing #{path}") + assert_equal 0, $?.exitstatus + assert !File.exist?(path) + end end __END__ |
