diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_checksums.rb | 16 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_formula_install.rb | 15 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_patching.rb | 13 | ||||
| -rw-r--r-- | Library/Homebrew/test/testball.rb | 14 |
4 files changed, 17 insertions, 41 deletions
diff --git a/Library/Homebrew/test/test_checksums.rb b/Library/Homebrew/test/test_checksums.rb index a9208e7f6..67b115c87 100644 --- a/Library/Homebrew/test/test_checksums.rb +++ b/Library/Homebrew/test/test_checksums.rb @@ -3,24 +3,10 @@ require 'testing_env' require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser ARGV.extend(HomebrewArgvExtension) -require 'formula' +require 'test/testball' 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 def good_checksum f assert_nothing_raised { nostdout { f.new.brew {} } } diff --git a/Library/Homebrew/test/test_formula_install.rb b/Library/Homebrew/test/test_formula_install.rb index fcf5fec54..eb2dcb491 100644 --- a/Library/Homebrew/test/test_formula_install.rb +++ b/Library/Homebrew/test/test_formula_install.rb @@ -4,24 +4,11 @@ require 'extend/ARGV' # needs to be after test/unit to avoid conflict with Optio ARGV.extend(HomebrewArgvExtension) require 'formula' +require 'test/testball' require 'keg' 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 url "file:///#{Pathname.new(ABS__FILE__).realpath}" version "1" diff --git a/Library/Homebrew/test/test_patching.rb b/Library/Homebrew/test/test_patching.rb index df4825711..ea8d159a6 100644 --- a/Library/Homebrew/test/test_patching.rb +++ b/Library/Homebrew/test/test_patching.rb @@ -3,21 +3,10 @@ require 'testing_env' require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser ARGV.extend(HomebrewArgvExtension) -require 'formula' +require 'test/testball' 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 def patches # Default is p1 diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb new file mode 100644 index 000000000..6393342e5 --- /dev/null +++ b/Library/Homebrew/test/testball.rb @@ -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 |
