aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-04-13 21:47:33 -0500
committerJack Nagel2012-04-14 00:00:04 -0500
commita64f417f364f4942d355177c2787d3787f617eca (patch)
tree2c8176e1424940d3eeeaf8adc07abdccbdd63058 /Library
parentbf0955dc8a37456fc991859c346000466a5fd652 (diff)
downloadbrew-a64f417f364f4942d355177c2787d3787f617eca.tar.bz2
tests: remove special-casing @path in TestBall
Tests that expect Formula#path to resolve to a real path should use TestBallWithRealPath; TestBall gets its original behavior back, fixing a failing test in test_formula_install. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_bucket.rb2
-rw-r--r--Library/Homebrew/test/testball.rb8
2 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_bucket.rb b/Library/Homebrew/test/test_bucket.rb
index 0c14f39c0..3247260c9 100644
--- a/Library/Homebrew/test/test_bucket.rb
+++ b/Library/Homebrew/test/test_bucket.rb
@@ -86,7 +86,7 @@ class BeerTasting < Test::Unit::TestCase
nostdout do
assert_nothing_raised do
- f=TestBall.new
+ f=TestBallWithRealPath.new
Homebrew.info_formula f
Cleaner.new f
Homebrew.prune
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb
index ecee9d709..f440a6ed9 100644
--- a/Library/Homebrew/test/testball.rb
+++ b/Library/Homebrew/test/testball.rb
@@ -6,7 +6,6 @@ class TestBall <Formula
@url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "testball"
- @path = Pathname.new(__FILE__)
end
def install
prefix.install "bin"
@@ -14,6 +13,13 @@ class TestBall <Formula
end
end
+class TestBallWithRealPath < TestBall
+ def initialize name=nil
+ super "testballwithrealpath"
+ @path = Pathname.new(__FILE__)
+ end
+end
+
class TestBallWithMirror < Formula
# `url` is bogus---curl should fail to download it. The mirror is fine
# though.