aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Formula/git.rb2
-rw-r--r--Library/Homebrew/cmd/test.rb4
-rw-r--r--Library/Homebrew/formula.rb2
3 files changed, 7 insertions, 1 deletions
diff --git a/Library/Formula/git.rb b/Library/Formula/git.rb
index 7831c5e5c..80aa50660 100644
--- a/Library/Formula/git.rb
+++ b/Library/Formula/git.rb
@@ -100,7 +100,7 @@ class Git < Formula
test do
HOMEBREW_REPOSITORY.cd do
- `#{bin}/git ls-files -- bin`.chomp == 'bin/brew'
+ assert_equal 'bin/brew', `#{bin}/git ls-files -- bin`.strip
end
end
end
diff --git a/Library/Homebrew/cmd/test.rb b/Library/Homebrew/cmd/test.rb
index 24644f41f..ecc087436 100644
--- a/Library/Homebrew/cmd/test.rb
+++ b/Library/Homebrew/cmd/test.rb
@@ -2,6 +2,7 @@ require 'extend/ENV'
require 'hardware'
require 'keg'
require 'timeout'
+require 'test/unit/assertions'
module Homebrew extend self
TEST_TIMEOUT_SECONDS = 5*60
@@ -31,6 +32,9 @@ module Homebrew extend self
Timeout::timeout TEST_TIMEOUT_SECONDS do
raise if f.test == false
end
+ rescue Test::Unit::AssertionFailedError => e
+ ofail "#{f.name}: failed"
+ puts e.message
rescue Exception
ofail "#{f.name}: failed"
end
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 06dfafa45..402c4500b 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -562,6 +562,8 @@ class Formula
end
def test
+ require 'test/unit/assertions'
+ extend(Test::Unit::Assertions)
ret = nil
mktemp do
@testpath = Pathname.pwd