aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_bucket.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/test_bucket.rb')
-rw-r--r--Library/Homebrew/test/test_bucket.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/Library/Homebrew/test/test_bucket.rb b/Library/Homebrew/test/test_bucket.rb
index cdbe9bd81..ace2c1096 100644
--- a/Library/Homebrew/test/test_bucket.rb
+++ b/Library/Homebrew/test/test_bucket.rb
@@ -1,7 +1,7 @@
require 'testing_env'
require 'test/testball'
-class MockFormula <Formula
+class MockFormula < Formula
def initialize url
@url=url
@homepage = 'http://example.com/'
@@ -9,7 +9,7 @@ class MockFormula <Formula
end
end
-class TestZip <Formula
+class TestZip < Formula
def initialize
zip=HOMEBREW_CACHE.parent+'test-0.1.zip'
Kernel.system '/usr/bin/zip', '-q', '-0', zip, ABS__FILE__
@@ -39,7 +39,7 @@ class BeerTasting < Test::Unit::TestCase
def test_formula_funcs
classname=Formula.class_s(FOOBAR)
path=Formula.path(FOOBAR)
-
+
assert_equal "FooBar", classname
assert_match Regexp.new("^#{HOMEBREW_PREFIX}/Library/Formula"), path.to_s
@@ -57,14 +57,14 @@ class BeerTasting < Test::Unit::TestCase
end
}
end
-
+
assert_not_nil Formula.factory(FOOBAR)
end
-
+
def test_zip
nostdout { assert_nothing_raised { TestZip.new.brew {} } }
end
-
+
# needs resurrecting
# def test_no_ARGV_dupes
# ARGV.reset
@@ -73,7 +73,7 @@ class BeerTasting < Test::Unit::TestCase
# ARGV.named.each{|f| n+=1 if f == 'foo'}
# assert_equal 1, n
# end
-
+
def test_brew_h
require 'cmd/info'
require 'cmd/prune'
@@ -135,13 +135,13 @@ class BeerTasting < Test::Unit::TestCase
d.mkpath
assert_equal '0.1.9', d.version
end
-
+
def test_pathname_plus_yeast
nostdout do
assert_nothing_raised do
assert !Pathname.getwd.rmdir_if_possible
assert !Pathname.getwd.abv.empty?
-
+
abcd=orig_abcd=HOMEBREW_CACHE+'abcd'
FileUtils.cp ABS__FILE__, abcd
installed_paths=HOMEBREW_PREFIX.install abcd
@@ -154,7 +154,7 @@ class BeerTasting < Test::Unit::TestCase
abcd.unlink
abcd.write 'HELLOWORLD'
assert_equal 'HELLOWORLD', File.read(abcd)
-
+
assert !orig_abcd.exist?
rv=abcd.cp orig_abcd
assert orig_abcd.exist?
@@ -171,10 +171,10 @@ class BeerTasting < Test::Unit::TestCase
end
end
end
-
+
def test_pathname_properties
foo1 = HOMEBREW_CACHE/'foo-0.1.tar.gz'
-
+
assert_equal '.tar.gz', foo1.extname
assert_equal 'foo-0.1', foo1.stem
assert_equal '0.1', foo1.version