Clean up test classes
This commit is contained in:
parent
90574a6a4b
commit
27e3ab781c
@ -201,7 +201,6 @@ class FormulaTests < Test::Unit::TestCase
|
||||
class #{Formulary.class_s(name)} < Formula
|
||||
url 'foo-1.0'
|
||||
def initialize(*args)
|
||||
@homepage = 'http://example.com/'
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
@ -5,12 +5,10 @@ require 'keg'
|
||||
|
||||
|
||||
class TestScriptFileFormula < ScriptFileFormula
|
||||
url "file:///#{Pathname.new(ABS__FILE__).realpath}"
|
||||
url "file:///#{__FILE__}"
|
||||
version "1"
|
||||
|
||||
def initialize
|
||||
@name='test-script-formula'
|
||||
@homepage = 'http://example.com/'
|
||||
def initialize(name="test_script_formula", path=nil)
|
||||
super
|
||||
end
|
||||
end
|
||||
@ -58,11 +56,9 @@ class InstallTests < Test::Unit::TestCase
|
||||
def test_a_basic_install
|
||||
f=TestBall.new
|
||||
|
||||
assert_equal Formula.path(f.name), f.path
|
||||
assert !f.installed?
|
||||
|
||||
temporary_install f do
|
||||
assert_match Regexp.new("^#{HOMEBREW_CELLAR}/"), f.prefix.to_s
|
||||
|
||||
# Test that things made it into the Keg
|
||||
assert f.bin.directory?
|
||||
|
||||
@ -49,7 +49,7 @@ class FormulaValidationTests < Test::Unit::TestCase
|
||||
def test_validates_when_initialize_overridden
|
||||
assert_invalid :name do
|
||||
formula do
|
||||
def initialize; end
|
||||
def initialize(*); end
|
||||
end.brew {}
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
require 'formula'
|
||||
|
||||
class TestBall < Formula
|
||||
def initialize(name="test_ball")
|
||||
@homepage = 'http://example.com/'
|
||||
def initialize(name="test_ball", path=nil)
|
||||
self.class.instance_eval do
|
||||
stable.url "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
|
||||
stable.sha1 "482e737739d946b7c8cbaf127d9ee9c148b999f5"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user