aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/git-tracker.rb
diff options
context:
space:
mode:
authorJack Nagel2013-03-26 10:51:05 -0500
committerJack Nagel2013-03-26 12:58:45 -0500
commit96cffa012e95f4985de76838686dd631d08bb5ac (patch)
treeda85cf381fb5bf41f161ccd1f70d5518152c2197 /Library/Formula/git-tracker.rb
parentddc3a5635f3d92dd7b024bb1fdcc21f7d47d7161 (diff)
downloadhomebrew-96cffa012e95f4985de76838686dd631d08bb5ac.tar.bz2
git-tracker: improve test
Diffstat (limited to 'Library/Formula/git-tracker.rb')
-rw-r--r--Library/Formula/git-tracker.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/git-tracker.rb b/Library/Formula/git-tracker.rb
index c642284dd..604ec83e9 100644
--- a/Library/Formula/git-tracker.rb
+++ b/Library/Formula/git-tracker.rb
@@ -11,7 +11,10 @@ class GitTracker < Formula
rake 'standalone:install', "prefix=#{prefix}"
end
- def test
- `#{bin}/git-tracker test-command`.chomp == 'git-tracker is here. How are you?'
+ test do
+ require 'open3'
+ Open3.popen3("#{bin}/git-tracker", "test-command") do |_, stdout, _|
+ "git-tracker is here. How are you?" == stdout.read.strip
+ end
end
end