Prune some requires from test files

testing_env already requires utils; set up the ARGV and ENV extensions
there as well.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-06-19 22:50:15 -05:00
parent 76b2eee777
commit 90dbb8a141
20 changed files with 6 additions and 88 deletions

View File

@ -1,9 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
module ExtendArgvPlusYeast module ExtendArgvPlusYeast
def reset def reset
@named = nil @named = nil

View File

@ -1,10 +1,5 @@
require 'testing_env' require 'testing_env'
require 'utils'
require 'hardware' require 'hardware'
require 'extend/ENV'
require 'extend/ARGV'
ENV.extend(HomebrewEnvExtension)
ARGV.extend(HomebrewArgvExtension)
class EnvironmentTests < Test::Unit::TestCase class EnvironmentTests < Test::Unit::TestCase
def test_ENV_options def test_ENV_options

View File

@ -1,10 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'test/testball' require 'test/testball'
require 'utils'
class MockFormula <Formula class MockFormula <Formula
def initialize url def initialize url

View File

@ -1,11 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'test/testball' require 'test/testball'
require 'utils'
class ChecksumTests < Test::Unit::TestCase class ChecksumTests < Test::Unit::TestCase
def good_checksum f def good_checksum f

View File

@ -1,8 +1,4 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'cleaner' require 'cleaner'
class CleanerTestBall < Formula class CleanerTestBall < Formula

View File

@ -1,11 +1,4 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'extend/ENV'
ENV.extend(HomebrewEnvExtension)
require 'test/testball' require 'test/testball'
class CompilerTests < Test::Unit::TestCase class CompilerTests < Test::Unit::TestCase

View File

@ -1,12 +1,7 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'extend/string' require 'extend/string'
require 'test/testball' require 'test/testball'
require 'formula_installer' require 'formula_installer'
require 'utils'
class ExternalDepsTests < Test::Unit::TestCase class ExternalDepsTests < Test::Unit::TestCase

View File

@ -1,11 +1,4 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'extend/ENV'
ENV.extend(HomebrewEnvExtension)
require 'test/testball' require 'test/testball'
class AbstractDownloadStrategy class AbstractDownloadStrategy

View File

@ -1,12 +1,7 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'formula' require 'formula'
require 'test/testball' require 'test/testball'
require 'keg' require 'keg'
require 'utils'
class TestScriptFileFormula <ScriptFileFormula class TestScriptFileFormula <ScriptFileFormula

View File

@ -1,11 +1,6 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'hardware' require 'hardware'
class HardwareTests < Test::Unit::TestCase class HardwareTests < Test::Unit::TestCase
# these will raise if we don't recognise your mac, but that prolly # these will raise if we don't recognise your mac, but that prolly
# indicates something went wrong rather than we don't know # indicates something went wrong rather than we don't know

View File

@ -1,5 +1,4 @@
require 'testing_env' require 'testing_env'
require 'utils'
require 'extend/string' require 'extend/string'
class InreplaceTest < Test::Unit::TestCase class InreplaceTest < Test::Unit::TestCase

View File

@ -1,8 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
def file pn def file pn
`/usr/bin/file -h '#{pn}'`.chomp `/usr/bin/file -h '#{pn}'`.chomp
end end

View File

@ -1,10 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'test/testball' require 'test/testball'
require 'utils'
require 'set' require 'set'
# Expose some internals # Expose some internals

View File

@ -1,10 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'test/testball' require 'test/testball'
require 'utils'
class DefaultPatchBall <TestBall class DefaultPatchBall <TestBall

View File

@ -1,9 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
TEMP_FOLDER = HOMEBREW_PREFIX+"temp_dir" TEMP_FOLDER = HOMEBREW_PREFIX+"temp_dir"
TARGET_FOLDER = TEMP_FOLDER+'folder1' TARGET_FOLDER = TEMP_FOLDER+'folder1'

View File

@ -1,6 +1,4 @@
require 'testing_env' require 'testing_env'
require 'utils'
require 'extend/string' require 'extend/string'
class StringTest <Test::Unit::TestCase class StringTest <Test::Unit::TestCase

View File

@ -1,12 +1,7 @@
abort if ARGV.include? "--skip-update" abort if ARGV.include? "--skip-update"
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'formula' require 'formula'
require 'utils'
require 'cmd/update' require 'cmd/update'
class UpdaterMock < Updater class UpdaterMock < Updater

View File

@ -1,11 +1,5 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'utils'
class UtilTests < Test::Unit::TestCase class UtilTests < Test::Unit::TestCase
def test_put_columns_empty def test_put_columns_empty

View File

@ -1,8 +1,4 @@
require 'testing_env' require 'testing_env'
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'formula' require 'formula'
require 'test/testball' require 'test/testball'

View File

@ -58,3 +58,9 @@ unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']
end end
require 'test/unit' # must be after at_exit require 'test/unit' # must be after at_exit
require 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
require 'extend/ENV'
ENV.extend(HomebrewEnvExtension)