aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Naberezny2014-02-16 14:56:25 -0800
committerAdam Vandenberg2014-02-16 15:56:52 -0800
commitae22ff428049a6dfacfa40ac1c85d82d1aaf9b15 (patch)
tree32d229ee306b1e89b05edf3067ddf5516f637deb
parent5ad6dcb95109cd1f1cee62f3a73f301f3ed2a9d8 (diff)
downloadhomebrew-ae22ff428049a6dfacfa40ac1c85d82d1aaf9b15.tar.bz2
scrub: add test
Closes #26778. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/scrub.rb10
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__