Move TestBall definition to separate file.

This commit is contained in:
Adam Vandenberg 2010-03-02 22:54:12 -08:00
parent 259ae27cc4
commit 1f82fe4dc7
4 changed files with 17 additions and 41 deletions

View File

@ -3,24 +3,10 @@ require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension) ARGV.extend(HomebrewArgvExtension)
require 'formula' require 'test/testball'
require 'utils' require 'utils'
class TestBall <Formula
# name parameter required for some Formula::factory
def initialize name=nil
@url="file:///#{TEST_FOLDER}/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "testball"
end
def install
prefix.install "bin"
prefix.install "libexec"
end
end
class ChecksumTests < Test::Unit::TestCase class ChecksumTests < Test::Unit::TestCase
def good_checksum f def good_checksum f
assert_nothing_raised { nostdout { f.new.brew {} } } assert_nothing_raised { nostdout { f.new.brew {} } }

View File

@ -4,24 +4,11 @@ require 'extend/ARGV' # needs to be after test/unit to avoid conflict with Optio
ARGV.extend(HomebrewArgvExtension) ARGV.extend(HomebrewArgvExtension)
require 'formula' require 'formula'
require 'test/testball'
require 'keg' require 'keg'
require 'utils' require 'utils'
class TestBall <Formula
# name parameter required for some Formula::factory
def initialize name=nil
@url="file:///#{TEST_FOLDER}/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "testball"
end
def install
prefix.install "bin"
prefix.install "libexec"
end
end
class TestScriptFileFormula <ScriptFileFormula class TestScriptFileFormula <ScriptFileFormula
url "file:///#{Pathname.new(ABS__FILE__).realpath}" url "file:///#{Pathname.new(ABS__FILE__).realpath}"
version "1" version "1"

View File

@ -3,21 +3,10 @@ require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension) ARGV.extend(HomebrewArgvExtension)
require 'formula' require 'test/testball'
require 'utils' require 'utils'
class TestBall <Formula
def initialize name
@url="file:///#{TEST_FOLDER}/testball-0.1.tbz"
@homepage = 'http://example.com/'
@md5='71aa838a9e4050d1876a295a9e62cbe6'
super name
end
def install ; end
end
class DefaultPatchBall <TestBall class DefaultPatchBall <TestBall
def patches def patches
# Default is p1 # Default is p1

View File

@ -0,0 +1,14 @@
require 'formula'
class TestBall <Formula
# name parameter required for some Formula::factory
def initialize name=nil
@url="file:///#{TEST_FOLDER}/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "testball"
end
def install
prefix.install "bin"
prefix.install "libexec"
end
end