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 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsParser
ARGV.extend(HomebrewArgvExtension)
module ExtendArgvPlusYeast
def reset
@named = nil

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,4 @@
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'
class CompilerTests < Test::Unit::TestCase

View File

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

View File

@ -1,11 +1,4 @@
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'
class AbstractDownloadStrategy

View File

@ -1,12 +1,7 @@
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 'keg'
require 'utils'
class TestScriptFileFormula <ScriptFileFormula

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,5 @@
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"
TARGET_FOLDER = TEMP_FOLDER+'folder1'

View File

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

View File

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

View File

@ -1,11 +1,5 @@
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
def test_put_columns_empty

View File

@ -1,8 +1,4 @@
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'

View File

@ -58,3 +58,9 @@ unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']
end
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)