aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2016-11-17 03:36:21 +0100
committerGitHub2016-11-17 03:36:21 +0100
commite6933b90dc750dc9aadb3bfb6acf1bf395942d57 (patch)
tree0da872ad2906fad53f176e05056181e0c6ccceaa /Library
parentedf042ee97f80955b077724119e717a51eb25e29 (diff)
parent7457af2b231528e1287281f6cfe651600d5f3f5d (diff)
downloadbrew-e6933b90dc750dc9aadb3bfb6acf1bf395942d57.tar.bz2
Merge pull request #1364 from reitermarkus/reorder-tests
Reorder and rename test files.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/.rubocop_todo.yml8
-rw-r--r--Library/Homebrew/cask/spec/spec_helper.rb6
-rw-r--r--Library/Homebrew/cask/test/test_helper.rb6
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb2
-rw-r--r--Library/Homebrew/dev-cmd/tests.rb16
-rw-r--r--Library/Homebrew/test/ARGV_test.rb (renamed from Library/Homebrew/test/test_ARGV.rb)0
-rw-r--r--Library/Homebrew/test/ENV_test.rb (renamed from Library/Homebrew/test/test_ENV.rb)2
-rw-r--r--Library/Homebrew/test/analytics_test.rb (renamed from Library/Homebrew/test/test_analytics.rb)2
-rw-r--r--Library/Homebrew/test/audit_test.rb (renamed from Library/Homebrew/test/test_audit.rb)0
-rw-r--r--Library/Homebrew/test/bash_test.rb (renamed from Library/Homebrew/test/test_bash.rb)0
-rw-r--r--Library/Homebrew/test/blacklist_test.rb (renamed from Library/Homebrew/test/test_blacklist.rb)0
-rw-r--r--Library/Homebrew/test/bottle_collector_test.rb (renamed from Library/Homebrew/test/test_bottle_collector.rb)0
-rw-r--r--Library/Homebrew/test/bottle_filename_test.rb (renamed from Library/Homebrew/test/test_bottle_filename.rb)0
-rw-r--r--Library/Homebrew/test/bottle_hooks_test.rb (renamed from Library/Homebrew/test/test_bottle_hooks.rb)0
-rw-r--r--Library/Homebrew/test/bottle_test.rb (renamed from Library/Homebrew/test/test_bottle.rb)2
-rw-r--r--Library/Homebrew/test/build_environment_test.rb (renamed from Library/Homebrew/test/test_build_environment.rb)0
-rw-r--r--Library/Homebrew/test/build_options_test.rb (renamed from Library/Homebrew/test/test_build_options.rb)0
-rw-r--r--Library/Homebrew/test/bundle_test.rb (renamed from Library/Homebrew/test/test_bundle.rb)2
-rw-r--r--Library/Homebrew/test/cache_formula_test.rb (renamed from Library/Homebrew/test/test_cache_formula.rb)2
-rw-r--r--Library/Homebrew/test/cache_test.rb (renamed from Library/Homebrew/test/test_cache.rb)2
-rw-r--r--Library/Homebrew/test/cask_test.rb (renamed from Library/Homebrew/test/test_cask.rb)2
-rw-r--r--Library/Homebrew/test/cat_test.rb (renamed from Library/Homebrew/test/test_cat.rb)2
-rw-r--r--Library/Homebrew/test/caveats_test.rb (renamed from Library/Homebrew/test/test_caveats.rb)0
-rw-r--r--Library/Homebrew/test/cellar_formula_test.rb (renamed from Library/Homebrew/test/test_cellar_formula.rb)2
-rw-r--r--Library/Homebrew/test/cellar_test.rb (renamed from Library/Homebrew/test/test_cellar.rb)2
-rw-r--r--Library/Homebrew/test/checksum_test.rb (renamed from Library/Homebrew/test/test_checksum.rb)0
-rw-r--r--Library/Homebrew/test/checksum_verification_test.rb (renamed from Library/Homebrew/test/test_checksum_verification.rb)2
-rw-r--r--Library/Homebrew/test/cleaner_test.rb (renamed from Library/Homebrew/test/test_cleaner.rb)4
-rw-r--r--Library/Homebrew/test/cleanup_test.rb (renamed from Library/Homebrew/test/test_cleanup.rb)4
-rw-r--r--Library/Homebrew/test/command_test.rb (renamed from Library/Homebrew/test/test_command.rb)2
-rw-r--r--Library/Homebrew/test/commands_test.rb (renamed from Library/Homebrew/test/test_commands.rb)2
-rw-r--r--Library/Homebrew/test/compiler_failure_test.rb (renamed from Library/Homebrew/test/test_compiler_failure.rb)0
-rw-r--r--Library/Homebrew/test/compiler_selector_test.rb (renamed from Library/Homebrew/test/test_compiler_selector.rb)0
-rw-r--r--Library/Homebrew/test/config_test.rb (renamed from Library/Homebrew/test/test_config.rb)2
-rw-r--r--Library/Homebrew/test/create_test.rb (renamed from Library/Homebrew/test/test_create.rb)4
-rw-r--r--Library/Homebrew/test/custom_command_test.rb (renamed from Library/Homebrew/test/test_custom_command.rb)2
-rw-r--r--Library/Homebrew/test/dependencies_test.rb (renamed from Library/Homebrew/test/test_dependencies.rb)0
-rw-r--r--Library/Homebrew/test/dependency_collector_test.rb (renamed from Library/Homebrew/test/test_dependency_collector.rb)0
-rw-r--r--Library/Homebrew/test/dependency_expansion_test.rb (renamed from Library/Homebrew/test/test_dependency_expansion.rb)0
-rw-r--r--Library/Homebrew/test/dependency_test.rb (renamed from Library/Homebrew/test/test_dependency.rb)0
-rw-r--r--Library/Homebrew/test/deps_test.rb (renamed from Library/Homebrew/test/test_deps.rb)2
-rw-r--r--Library/Homebrew/test/desc_test.rb (renamed from Library/Homebrew/test/test_desc.rb)2
-rw-r--r--Library/Homebrew/test/descriptions_test.rb (renamed from Library/Homebrew/test/test_descriptions.rb)0
-rw-r--r--Library/Homebrew/test/diagnostic_test.rb (renamed from Library/Homebrew/test/test_diagnostic.rb)0
-rw-r--r--Library/Homebrew/test/doctor_test.rb (renamed from Library/Homebrew/test/test_doctor.rb)2
-rw-r--r--Library/Homebrew/test/download_strategies_test.rb (renamed from Library/Homebrew/test/test_download_strategies.rb)0
-rw-r--r--Library/Homebrew/test/edit_test.rb (renamed from Library/Homebrew/test/test_edit.rb)2
-rw-r--r--Library/Homebrew/test/exceptions_test.rb (renamed from Library/Homebrew/test/test_exceptions.rb)0
-rw-r--r--Library/Homebrew/test/fetch_test.rb (renamed from Library/Homebrew/test/test_fetch.rb)2
-rw-r--r--Library/Homebrew/test/formula_installer_bottle_test.rb (renamed from Library/Homebrew/test/test_formula_installer_bottle.rb)4
-rw-r--r--Library/Homebrew/test/formula_installer_test.rb (renamed from Library/Homebrew/test/test_formula_installer.rb)4
-rw-r--r--Library/Homebrew/test/formula_lock_test.rb (renamed from Library/Homebrew/test/test_formula_lock.rb)0
-rw-r--r--Library/Homebrew/test/formula_pin_test.rb (renamed from Library/Homebrew/test/test_formula_pin.rb)0
-rw-r--r--Library/Homebrew/test/formula_spec_selection_test.rb (renamed from Library/Homebrew/test/test_formula_spec_selection.rb)0
-rw-r--r--Library/Homebrew/test/formula_support_test.rb (renamed from Library/Homebrew/test/test_formula_support.rb)0
-rw-r--r--Library/Homebrew/test/formula_test.rb (renamed from Library/Homebrew/test/test_formula.rb)2
-rw-r--r--Library/Homebrew/test/formula_validation_test.rb (renamed from Library/Homebrew/test/test_formula_validation.rb)0
-rw-r--r--Library/Homebrew/test/formulary_test.rb (renamed from Library/Homebrew/test/test_formulary.rb)4
-rw-r--r--Library/Homebrew/test/gpg2_requirement_test.rb (renamed from Library/Homebrew/test/test_gpg2_requirement.rb)0
-rw-r--r--Library/Homebrew/test/gpg_test.rb (renamed from Library/Homebrew/test/test_gpg.rb)0
-rw-r--r--Library/Homebrew/test/hardware_test.rb (renamed from Library/Homebrew/test/test_hardware.rb)0
-rw-r--r--Library/Homebrew/test/help_test.rb (renamed from Library/Homebrew/test/test_help.rb)2
-rw-r--r--Library/Homebrew/test/home_test.rb (renamed from Library/Homebrew/test/test_home.rb)2
-rw-r--r--Library/Homebrew/test/info_test.rb (renamed from Library/Homebrew/test/test_info.rb)2
-rw-r--r--Library/Homebrew/test/inreplace_test.rb (renamed from Library/Homebrew/test/test_inreplace.rb)0
-rw-r--r--Library/Homebrew/test/install_test.rb (renamed from Library/Homebrew/test/test_install.rb)2
-rw-r--r--Library/Homebrew/test/irb_test.rb (renamed from Library/Homebrew/test/test_irb.rb)2
-rw-r--r--Library/Homebrew/test/json_test.rb (renamed from Library/Homebrew/test/test_json.rb)0
-rw-r--r--Library/Homebrew/test/keg_test.rb (renamed from Library/Homebrew/test/test_keg.rb)0
-rw-r--r--Library/Homebrew/test/language_go_test.rb (renamed from Library/Homebrew/test/test_language_go.rb)0
-rw-r--r--Library/Homebrew/test/language_module_requirement_test.rb (renamed from Library/Homebrew/test/test_language_module_requirement.rb)0
-rw-r--r--Library/Homebrew/test/language_python_test.rb (renamed from Library/Homebrew/test/test_language_python.rb)0
-rw-r--r--Library/Homebrew/test/leaves_test.rb (renamed from Library/Homebrew/test/test_leaves.rb)2
-rw-r--r--Library/Homebrew/test/link_test.rb (renamed from Library/Homebrew/test/test_link.rb)2
-rw-r--r--Library/Homebrew/test/linkapps_test.rb (renamed from Library/Homebrew/test/test_linkapps.rb)2
-rw-r--r--Library/Homebrew/test/list_test.rb (renamed from Library/Homebrew/test/test_list.rb)2
-rw-r--r--Library/Homebrew/test/log_formula_test.rb (renamed from Library/Homebrew/test/test_log_formula.rb)2
-rw-r--r--Library/Homebrew/test/log_test.rb (renamed from Library/Homebrew/test/test_log.rb)2
-rw-r--r--Library/Homebrew/test/migrate_test.rb (renamed from Library/Homebrew/test/test_migrate.rb)2
-rw-r--r--Library/Homebrew/test/migrator_test.rb (renamed from Library/Homebrew/test/test_migrator.rb)2
-rw-r--r--Library/Homebrew/test/missing_test.rb (renamed from Library/Homebrew/test/test_missing.rb)2
-rw-r--r--Library/Homebrew/test/mpi_requirement_test.rb (renamed from Library/Homebrew/test/test_mpi_requirement.rb)0
-rw-r--r--Library/Homebrew/test/options_test.rb (renamed from Library/Homebrew/test/test_options.rb)2
-rw-r--r--Library/Homebrew/test/os/mac/blacklist_test.rb (renamed from Library/Homebrew/test/test_os_mac_blacklist.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/bottle_collector_test.rb (renamed from Library/Homebrew/test/test_os_mac_bottle_collector.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/bottle_tag_test.rb (renamed from Library/Homebrew/test/test_os_mac_bottle_tag.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/dependency_collector_test.rb (renamed from Library/Homebrew/test/test_os_mac_dependency_collector.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/diagnostic_test.rb (renamed from Library/Homebrew/test/test_os_mac_diagnostic.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/keg_test.rb (renamed from Library/Homebrew/test/test_os_mac_keg.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/language_test.rb (renamed from Library/Homebrew/test/test_os_mac_language.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/mach_test.rb (renamed from Library/Homebrew/test/test_os_mac_mach.rb)4
-rw-r--r--Library/Homebrew/test/os/mac/version_test.rb (renamed from Library/Homebrew/test/test_os_mac_version.rb)0
-rw-r--r--Library/Homebrew/test/os/mac/x11_requirement_test.rb (renamed from Library/Homebrew/test/test_os_mac_x11_requirement.rb)0
-rw-r--r--Library/Homebrew/test/outdated_test.rb (renamed from Library/Homebrew/test/test_outdated.rb)2
-rw-r--r--Library/Homebrew/test/patch_test.rb (renamed from Library/Homebrew/test/test_patch.rb)0
-rw-r--r--Library/Homebrew/test/patching_test.rb (renamed from Library/Homebrew/test/test_patching.rb)12
-rw-r--r--Library/Homebrew/test/pathname_test.rb (renamed from Library/Homebrew/test/test_pathname.rb)0
-rw-r--r--Library/Homebrew/test/pin_unpin_test.rb (renamed from Library/Homebrew/test/test_pin_unpin.rb)2
-rw-r--r--Library/Homebrew/test/pkg_version_test.rb (renamed from Library/Homebrew/test/test_pkg_version.rb)0
-rw-r--r--Library/Homebrew/test/prefix_formula_test.rb (renamed from Library/Homebrew/test/test_prefix_formula.rb)2
-rw-r--r--Library/Homebrew/test/prefix_test.rb (renamed from Library/Homebrew/test/test_prefix.rb)2
-rw-r--r--Library/Homebrew/test/prune_test.rb (renamed from Library/Homebrew/test/test_prune.rb)2
-rw-r--r--Library/Homebrew/test/pull_offline_test.rb (renamed from Library/Homebrew/test/test_pull_offline.rb)2
-rw-r--r--Library/Homebrew/test/pull_test.rb (renamed from Library/Homebrew/test/test_pull.rb)2
-rw-r--r--Library/Homebrew/test/readall_test.rb (renamed from Library/Homebrew/test/test_readall.rb)2
-rw-r--r--Library/Homebrew/test/reinstall_pinned_test.rb (renamed from Library/Homebrew/test/test_reinstall_pinned.rb)2
-rw-r--r--Library/Homebrew/test/reinstall_test.rb (renamed from Library/Homebrew/test/test_reinstall.rb)2
-rw-r--r--Library/Homebrew/test/repository_test.rb (renamed from Library/Homebrew/test/test_repository.rb)2
-rw-r--r--Library/Homebrew/test/requirement_test.rb (renamed from Library/Homebrew/test/test_requirement.rb)0
-rw-r--r--Library/Homebrew/test/resource_test.rb (renamed from Library/Homebrew/test/test_resource.rb)0
-rw-r--r--Library/Homebrew/test/sandbox_test.rb (renamed from Library/Homebrew/test/test_sandbox.rb)0
-rw-r--r--Library/Homebrew/test/search_remote_tap_test.rb (renamed from Library/Homebrew/test/test_search_remote_tap.rb)0
-rw-r--r--Library/Homebrew/test/search_test.rb (renamed from Library/Homebrew/test/test_search.rb)2
-rw-r--r--Library/Homebrew/test/services_test.rb (renamed from Library/Homebrew/test/test_services.rb)2
-rw-r--r--Library/Homebrew/test/sh_test.rb (renamed from Library/Homebrew/test/test_sh.rb)2
-rw-r--r--Library/Homebrew/test/shell_test.rb (renamed from Library/Homebrew/test/test_shell.rb)0
-rw-r--r--Library/Homebrew/test/software_spec_test.rb (renamed from Library/Homebrew/test/test_software_spec.rb)0
-rw-r--r--Library/Homebrew/test/stdlib_test.rb (renamed from Library/Homebrew/test/test_stdlib.rb)0
-rw-r--r--Library/Homebrew/test/string_test.rb (renamed from Library/Homebrew/test/test_string.rb)0
l---------Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz (renamed from Library/Homebrew/test/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz)0
l---------Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz (renamed from Library/Homebrew/test/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz)0
l---------Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz (renamed from Library/Homebrew/test/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz)0
l---------Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz (renamed from Library/Homebrew/test/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz)0
l---------Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz (renamed from Library/Homebrew/test/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz)0
l---------Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sierra.bottle.tar.gz (renamed from Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz)0
-rw-r--r--Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz (renamed from Library/Homebrew/test/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz)bin1379 -> 1379 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/AppWithBinary.zip (renamed from Library/Homebrew/test/fixtures/cask/AppWithBinary.zip)bin306 -> 306 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/AppWithEmbeddedBinary.zip (renamed from Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip)bin618 -> 618 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/MyFancyApp.zip (renamed from Library/Homebrew/test/fixtures/cask/MyFancyApp.zip)bin304 -> 304 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/MyFancyPkg.zip (renamed from Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip)bin532 -> 532 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/NestedApp.dmg.zip (renamed from Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip)bin2494 -> 2494 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/caffeine-suite.zip (renamed from Library/Homebrew/test/fixtures/cask/caffeine-suite.zip)bin3170 -> 3170 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/caffeine.zip (renamed from Library/Homebrew/test/fixtures/cask/caffeine.zip)bin1328 -> 1328 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/caffeines-subdir.zip (renamed from Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip)bin3240 -> 3240 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/caffeines.zip (renamed from Library/Homebrew/test/fixtures/cask/caffeines.zip)bin2796 -> 2796 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.7z (renamed from Library/Homebrew/test/fixtures/cask/container.7z)bin143 -> 143 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.air (renamed from Library/Homebrew/test/fixtures/cask/container.air)bin5934 -> 5934 bytes
-rwxr-xr-xLibrary/Homebrew/test/support/fixtures/cask/container.bz2 (renamed from Library/Homebrew/test/fixtures/cask/container.bz2)bin59 -> 59 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.cab (renamed from Library/Homebrew/test/fixtures/cask/container.cab)bin95 -> 95 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.dmg (renamed from Library/Homebrew/test/fixtures/cask/container.dmg)bin25337 -> 25337 bytes
-rwxr-xr-xLibrary/Homebrew/test/support/fixtures/cask/container.gz (renamed from Library/Homebrew/test/fixtures/cask/container.gz)bin47 -> 47 bytes
-rwxr-xr-xLibrary/Homebrew/test/support/fixtures/cask/container.lzma (renamed from Library/Homebrew/test/fixtures/cask/container.lzma)bin41 -> 41 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.pkg (renamed from Library/Homebrew/test/fixtures/cask/container.pkg)bin516 -> 516 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.rar (renamed from Library/Homebrew/test/fixtures/cask/container.rar)bin87 -> 87 bytes
-rwxr-xr-xLibrary/Homebrew/test/support/fixtures/cask/container.sit (renamed from Library/Homebrew/test/fixtures/cask/container.sit)bin236 -> 236 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.tar.gz (renamed from Library/Homebrew/test/fixtures/cask/container.tar.gz)bin154 -> 154 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/container.xar (renamed from Library/Homebrew/test/fixtures/cask/container.xar)bin4679 -> 4679 bytes
-rwxr-xr-xLibrary/Homebrew/test/support/fixtures/cask/container.xz (renamed from Library/Homebrew/test/fixtures/cask/container.xz)bin76 -> 76 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/empty_directory/.gitignore (renamed from Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore)0
-rwxr-xr-xLibrary/Homebrew/test/support/fixtures/cask/naked_executable (renamed from Library/Homebrew/test/fixtures/cask/naked_executable)0
-rw-r--r--Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg (renamed from Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg)bin28490 -> 28490 bytes
-rwxr-xr-xLibrary/Homebrew/test/support/fixtures/mach/a.out (renamed from Library/Homebrew/test/mach/a.out)bin25072 -> 25072 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/mach/fat.bundle (renamed from Library/Homebrew/test/mach/fat.bundle)bin16472 -> 16472 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/mach/fat.dylib (renamed from Library/Homebrew/test/mach/fat.dylib)bin16452 -> 16452 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/mach/i386.bundle (renamed from Library/Homebrew/test/mach/i386.bundle)bin4168 -> 4168 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/mach/i386.dylib (renamed from Library/Homebrew/test/mach/i386.dylib)bin4164 -> 4164 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/mach/x86_64.bundle (renamed from Library/Homebrew/test/mach/x86_64.bundle)bin4184 -> 4184 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/mach/x86_64.dylib (renamed from Library/Homebrew/test/mach/x86_64.dylib)bin4176 -> 4176 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/patches/noop-a.diff (renamed from Library/Homebrew/test/patches/noop-a.diff)0
-rw-r--r--Library/Homebrew/test/support/fixtures/patches/noop-b.diff (renamed from Library/Homebrew/test/patches/noop-b.diff)0
-rw-r--r--Library/Homebrew/test/support/fixtures/patches/noop-c.diff (renamed from Library/Homebrew/test/patches/noop-c.diff)0
-rw-r--r--Library/Homebrew/test/support/fixtures/receipt.json (renamed from Library/Homebrew/test/fixtures/receipt.json)0
-rw-r--r--Library/Homebrew/test/support/fixtures/receipt_old.json (renamed from Library/Homebrew/test/fixtures/receipt_old.json)0
-rw-r--r--Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-patches.tgz (renamed from Library/Homebrew/test/tarballs/testball-0.1-patches.tgz)bin368 -> 368 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/tarballs/testball-0.1.tbz (renamed from Library/Homebrew/test/tarballs/testball-0.1.tbz)bin1318 -> 1318 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/tarballs/testbottest-0.1.tbz (renamed from Library/Homebrew/test/tarballs/testbottest-0.1.tbz)bin548 -> 548 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.diff (renamed from Library/Homebrew/test/fixtures/test.diff)0
-rw-r--r--Library/Homebrew/test/support/fixtures/test.eps (renamed from Library/Homebrew/test/fixtures/test.eps)0
-rw-r--r--Library/Homebrew/test/support/fixtures/test.gif (renamed from Library/Homebrew/test/fixtures/test.gif)bin43 -> 43 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.ico (renamed from Library/Homebrew/test/fixtures/test.ico)bin1182 -> 1182 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.jpg (renamed from Library/Homebrew/test/fixtures/test.jpg)bin288 -> 288 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.m4a (renamed from Library/Homebrew/test/fixtures/test.m4a)bin1689 -> 1689 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.mp3 (renamed from Library/Homebrew/test/fixtures/test.mp3)bin360 -> 360 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.pcap (renamed from Library/Homebrew/test/fixtures/test.pcap)bin1415 -> 1415 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.pdf (renamed from Library/Homebrew/test/fixtures/test.pdf)0
-rw-r--r--Library/Homebrew/test/support/fixtures/test.png (renamed from Library/Homebrew/test/fixtures/test.png)bin82 -> 82 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.ps (renamed from Library/Homebrew/test/fixtures/test.ps)0
-rw-r--r--Library/Homebrew/test/support/fixtures/test.svg (renamed from Library/Homebrew/test/fixtures/test.svg)0
-rw-r--r--Library/Homebrew/test/support/fixtures/test.tiff (renamed from Library/Homebrew/test/fixtures/test.tiff)bin3916 -> 3916 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/test.wav (renamed from Library/Homebrew/test/fixtures/test.wav)bin1070 -> 1070 bytes
-rw-r--r--Library/Homebrew/test/support/fixtures/testball.rb (renamed from Library/Homebrew/test/testball.rb)2
-rw-r--r--Library/Homebrew/test/support/fixtures/testball_bottle.rb (renamed from Library/Homebrew/test/testball_bottle.rb)4
-rw-r--r--Library/Homebrew/test/support/fixtures/testbottest.rb (renamed from Library/Homebrew/test/testbottest.rb)2
-rw-r--r--Library/Homebrew/test/support/fixtures/updater_fixture.yaml (renamed from Library/Homebrew/test/fixtures/updater_fixture.yaml)0
-rw-r--r--Library/Homebrew/test/support/helper/env.rb (renamed from Library/Homebrew/test/helper/env.rb)0
-rw-r--r--Library/Homebrew/test/support/helper/fs_leak_logger.rb27
-rw-r--r--Library/Homebrew/test/support/helper/integration_command_test_case.rb (renamed from Library/Homebrew/test/helper/integration_command_test_case.rb)12
-rw-r--r--Library/Homebrew/test/support/helper/integration_mocks.rb (renamed from Library/Homebrew/test/lib/integration_mocks.rb)0
-rw-r--r--Library/Homebrew/test/support/helper/shutup.rb (renamed from Library/Homebrew/test/helper/shutup.rb)0
-rw-r--r--Library/Homebrew/test/support/helper/test_case.rb64
-rw-r--r--Library/Homebrew/test/support/helper/version_assertions.rb23
-rw-r--r--Library/Homebrew/test/support/lib/config.rb (renamed from Library/Homebrew/test/lib/config.rb)4
-rw-r--r--Library/Homebrew/test/switch_test.rb (renamed from Library/Homebrew/test/test_switch.rb)2
-rw-r--r--Library/Homebrew/test/tab_test.rb (renamed from Library/Homebrew/test/test_tab.rb)2
-rw-r--r--Library/Homebrew/test/tap_new_test.rb (renamed from Library/Homebrew/test/test_tap_new.rb)2
-rw-r--r--Library/Homebrew/test/tap_test.rb (renamed from Library/Homebrew/test/test_tap.rb)2
-rw-r--r--Library/Homebrew/test/test_formula_test.rb (renamed from Library/Homebrew/test/test_test_formula.rb)4
-rw-r--r--Library/Homebrew/test/testing_env.rb111
-rw-r--r--Library/Homebrew/test/uninstall_test.rb (renamed from Library/Homebrew/test/test_uninstall.rb)1
-rw-r--r--Library/Homebrew/test/unlink_test.rb (renamed from Library/Homebrew/test/test_unlink.rb)2
-rw-r--r--Library/Homebrew/test/unlinkapps_test.rb (renamed from Library/Homebrew/test/test_unlinkapps.rb)2
-rw-r--r--Library/Homebrew/test/unpack_test.rb (renamed from Library/Homebrew/test/test_unpack.rb)2
-rw-r--r--Library/Homebrew/test/update_report_test.rb (renamed from Library/Homebrew/test/test_update_report.rb)0
-rw-r--r--Library/Homebrew/test/upgrade_test.rb (renamed from Library/Homebrew/test/test_upgrade.rb)2
-rw-r--r--Library/Homebrew/test/uses_test.rb (renamed from Library/Homebrew/test/test_uses.rb)2
-rw-r--r--Library/Homebrew/test/utils/tty_test.rb46
-rw-r--r--Library/Homebrew/test/utils_test.rb (renamed from Library/Homebrew/test/test_utils.rb)44
-rw-r--r--Library/Homebrew/test/version_test.rb (renamed from Library/Homebrew/test/test_version.rb)2
-rw-r--r--Library/Homebrew/test/versions_test.rb (renamed from Library/Homebrew/test/test_versions.rb)0
-rw-r--r--Library/Homebrew/test/x11_requirement_test.rb (renamed from Library/Homebrew/test/test_x11_requirement.rb)0
210 files changed, 276 insertions, 266 deletions
diff --git a/Library/Homebrew/.rubocop_todo.yml b/Library/Homebrew/.rubocop_todo.yml
index 867a61966..3705170fd 100644
--- a/Library/Homebrew/.rubocop_todo.yml
+++ b/Library/Homebrew/.rubocop_todo.yml
@@ -21,7 +21,7 @@ Lint/HandleExceptions:
- 'extend/pathname.rb'
- 'formula.rb'
- 'formula_versions.rb'
- - 'test/test_ENV.rb'
+ - 'test/ENV_test.rb'
# Offense count: 3
Lint/IneffectiveAccessModifier:
@@ -51,7 +51,7 @@ Lint/RescueException:
- 'postinstall.rb'
- 'readall.rb'
- 'test.rb'
- - 'test/test_ENV.rb'
+ - 'test/ENV_test.rb'
- 'utils/fork.rb'
# Offense count: 1
@@ -90,7 +90,7 @@ Style/ClassVars:
Exclude:
- 'dev-cmd/audit.rb'
- 'formula_installer.rb'
- - 'test/testing_env.rb'
+ - 'test/support/helper/fs_leak_logger.rb'
# Offense count: 13
# Configuration parameters: AllowedVariables.
@@ -114,7 +114,7 @@ Style/MultilineBlockChain:
- 'dev-cmd/audit.rb'
- 'dev-cmd/man.rb'
- 'diagnostic.rb'
- - 'test/test_patching.rb'
+ - 'test/patching_test.rb'
# Offense count: 4
# Cop supports --auto-correct.
diff --git a/Library/Homebrew/cask/spec/spec_helper.rb b/Library/Homebrew/cask/spec/spec_helper.rb
index 7e72a2cee..458fe00f4 100644
--- a/Library/Homebrew/cask/spec/spec_helper.rb
+++ b/Library/Homebrew/cask/spec/spec_helper.rb
@@ -8,15 +8,15 @@ end
# add Homebrew to load path
$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew"))
-$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/lib"))
+$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/support/lib"))
require "global"
# add Homebrew-Cask to load path
$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.join("cask", "lib").to_s)
-require "test/helper/env"
-require "test/helper/shutup"
+require "test/support/helper/env"
+require "test/support/helper/shutup"
Pathname.glob(HOMEBREW_LIBRARY_PATH.join("cask", "spec", "support", "*.rb")).each(&method(:require))
diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb
index 73459cb25..275ede304 100644
--- a/Library/Homebrew/cask/test/test_helper.rb
+++ b/Library/Homebrew/cask/test/test_helper.rb
@@ -6,15 +6,15 @@ require "simplecov" if ENV["HOMEBREW_TESTS_COVERAGE"]
# add Homebrew to load path
$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew"))
-$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/lib"))
+$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew/test/support/lib"))
require "global"
# add Homebrew-Cask to load path
$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.join("cask", "lib").to_s)
-require "test/helper/env"
-require "test/helper/shutup"
+require "test/support/helper/env"
+require "test/support/helper/shutup"
include Test::Helper::Env
include Test::Helper::Shutup
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index c7461fc5a..df3b5fafe 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -761,7 +761,7 @@ class FormulaAuditor
bin_names.each do |name|
["system", "shell_output", "pipe_output"].each do |cmd|
if text =~ /(def test|test do).*#{cmd}[\(\s]+['"]#{Regexp.escape name}[\s'"]/m
- problem %(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}")
+ problem %Q(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}")
end
end
end
diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb
index ee7fa9275..c032b3437 100644
--- a/Library/Homebrew/dev-cmd/tests.rb
+++ b/Library/Homebrew/dev-cmd/tests.rb
@@ -8,7 +8,7 @@ module Homebrew
module_function
def tests
- (HOMEBREW_LIBRARY/"Homebrew").cd do
+ HOMEBREW_LIBRARY_PATH.cd do
ENV.delete "HOMEBREW_VERBOSE"
ENV.delete "VERBOSE"
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
@@ -44,8 +44,8 @@ module Homebrew
# Make it easier to reproduce test runs.
ENV["SEED"] = ARGV.next if ARGV.include? "--seed"
- files = Dir["test/test_*.rb"]
- files -= Dir["test/test_os_mac_*.rb"] unless OS.mac?
+ files = Dir.glob("test/**/*_test.rb")
+ .reject { |p| !OS.mac? && p.start_with?("test/os/mac/") }
opts = []
opts << "--serialize-stdout" if ENV["CI"]
@@ -54,20 +54,18 @@ module Homebrew
args << "--trace" if ARGV.include? "--trace"
if ARGV.value("only")
- ENV["HOMEBREW_TESTS_ONLY"] = "1"
- test_name, test_method = ARGV.value("only").split("/", 2)
- files = ["test/test_#{test_name}.rb"]
+ test_name, test_method = ARGV.value("only").split(":", 2)
+ files = Dir.glob("test/{#{test_name},#{test_name}/**/*}_test.rb")
args << "--name=test_#{test_method}" if test_method
end
args += ARGV.named.select { |v| v[/^TEST(OPTS)?=/] }
- system "bundle", "exec", "parallel_test", *opts,
- "--", *args, "--", *files
+ system "bundle", "exec", "parallel_test", *opts, "--", *args, "--", *files
Homebrew.failed = !$?.success?
- if (fs_leak_log = HOMEBREW_LIBRARY/"Homebrew/test/fs_leak_log").file?
+ if (fs_leak_log = HOMEBREW_LIBRARY_PATH/"tmp/fs_leak.log").file?
fs_leak_log_content = fs_leak_log.read
unless fs_leak_log_content.empty?
opoo "File leak is detected"
diff --git a/Library/Homebrew/test/test_ARGV.rb b/Library/Homebrew/test/ARGV_test.rb
index 6805e0c62..6805e0c62 100644
--- a/Library/Homebrew/test/test_ARGV.rb
+++ b/Library/Homebrew/test/ARGV_test.rb
diff --git a/Library/Homebrew/test/test_ENV.rb b/Library/Homebrew/test/ENV_test.rb
index e38c75c6e..6c0e68a9e 100644
--- a/Library/Homebrew/test/test_ENV.rb
+++ b/Library/Homebrew/test/ENV_test.rb
@@ -1,6 +1,6 @@
require "testing_env"
require "extend/ENV"
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestEnv < IntegrationCommandTestCase
def test_env
diff --git a/Library/Homebrew/test/test_analytics.rb b/Library/Homebrew/test/analytics_test.rb
index 00e0593db..37040f3cd 100644
--- a/Library/Homebrew/test/test_analytics.rb
+++ b/Library/Homebrew/test/analytics_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestAnalytics < IntegrationCommandTestCase
def test_analytics
diff --git a/Library/Homebrew/test/test_audit.rb b/Library/Homebrew/test/audit_test.rb
index 2725f906e..2725f906e 100644
--- a/Library/Homebrew/test/test_audit.rb
+++ b/Library/Homebrew/test/audit_test.rb
diff --git a/Library/Homebrew/test/test_bash.rb b/Library/Homebrew/test/bash_test.rb
index ff418c787..ff418c787 100644
--- a/Library/Homebrew/test/test_bash.rb
+++ b/Library/Homebrew/test/bash_test.rb
diff --git a/Library/Homebrew/test/test_blacklist.rb b/Library/Homebrew/test/blacklist_test.rb
index 585a35484..585a35484 100644
--- a/Library/Homebrew/test/test_blacklist.rb
+++ b/Library/Homebrew/test/blacklist_test.rb
diff --git a/Library/Homebrew/test/test_bottle_collector.rb b/Library/Homebrew/test/bottle_collector_test.rb
index d75e29ec8..d75e29ec8 100644
--- a/Library/Homebrew/test/test_bottle_collector.rb
+++ b/Library/Homebrew/test/bottle_collector_test.rb
diff --git a/Library/Homebrew/test/test_bottle_filename.rb b/Library/Homebrew/test/bottle_filename_test.rb
index 6604e7d6a..6604e7d6a 100644
--- a/Library/Homebrew/test/test_bottle_filename.rb
+++ b/Library/Homebrew/test/bottle_filename_test.rb
diff --git a/Library/Homebrew/test/test_bottle_hooks.rb b/Library/Homebrew/test/bottle_hooks_test.rb
index 3535d80ef..3535d80ef 100644
--- a/Library/Homebrew/test/test_bottle_hooks.rb
+++ b/Library/Homebrew/test/bottle_hooks_test.rb
diff --git a/Library/Homebrew/test/test_bottle.rb b/Library/Homebrew/test/bottle_test.rb
index 48727cfd9..c10746e09 100644
--- a/Library/Homebrew/test/test_bottle.rb
+++ b/Library/Homebrew/test/bottle_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestBottle < IntegrationCommandTestCase
def test_bottle
diff --git a/Library/Homebrew/test/test_build_environment.rb b/Library/Homebrew/test/build_environment_test.rb
index 73a1c95f7..73a1c95f7 100644
--- a/Library/Homebrew/test/test_build_environment.rb
+++ b/Library/Homebrew/test/build_environment_test.rb
diff --git a/Library/Homebrew/test/test_build_options.rb b/Library/Homebrew/test/build_options_test.rb
index e460d25cc..e460d25cc 100644
--- a/Library/Homebrew/test/test_build_options.rb
+++ b/Library/Homebrew/test/build_options_test.rb
diff --git a/Library/Homebrew/test/test_bundle.rb b/Library/Homebrew/test/bundle_test.rb
index 6b040df1d..ae47977d8 100644
--- a/Library/Homebrew/test/test_bundle.rb
+++ b/Library/Homebrew/test/bundle_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestBundle < IntegrationCommandTestCase
def test_bundle
diff --git a/Library/Homebrew/test/test_cache_formula.rb b/Library/Homebrew/test/cache_formula_test.rb
index f4e37e2a2..6dcb6a745 100644
--- a/Library/Homebrew/test/test_cache_formula.rb
+++ b/Library/Homebrew/test/cache_formula_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCacheFormula < IntegrationCommandTestCase
def test_cache_formula
diff --git a/Library/Homebrew/test/test_cache.rb b/Library/Homebrew/test/cache_test.rb
index cd7a5e2fa..3a9e6b011 100644
--- a/Library/Homebrew/test/test_cache.rb
+++ b/Library/Homebrew/test/cache_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCache < IntegrationCommandTestCase
def test_cache
diff --git a/Library/Homebrew/test/test_cask.rb b/Library/Homebrew/test/cask_test.rb
index 6cae6d54b..d5b81facb 100644
--- a/Library/Homebrew/test/test_cask.rb
+++ b/Library/Homebrew/test/cask_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCask < IntegrationCommandTestCase
def test_cask
diff --git a/Library/Homebrew/test/test_cat.rb b/Library/Homebrew/test/cat_test.rb
index 4cfd19c3d..bb37b5fde 100644
--- a/Library/Homebrew/test/test_cat.rb
+++ b/Library/Homebrew/test/cat_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCat < IntegrationCommandTestCase
def test_cat
diff --git a/Library/Homebrew/test/test_caveats.rb b/Library/Homebrew/test/caveats_test.rb
index 9eaac5792..9eaac5792 100644
--- a/Library/Homebrew/test/test_caveats.rb
+++ b/Library/Homebrew/test/caveats_test.rb
diff --git a/Library/Homebrew/test/test_cellar_formula.rb b/Library/Homebrew/test/cellar_formula_test.rb
index 7c458be9d..38a934a7b 100644
--- a/Library/Homebrew/test/test_cellar_formula.rb
+++ b/Library/Homebrew/test/cellar_formula_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCellarFormula < IntegrationCommandTestCase
def test_cellar_formula
diff --git a/Library/Homebrew/test/test_cellar.rb b/Library/Homebrew/test/cellar_test.rb
index b793c5342..74d5389f8 100644
--- a/Library/Homebrew/test/test_cellar.rb
+++ b/Library/Homebrew/test/cellar_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCellar < IntegrationCommandTestCase
def test_cellar
diff --git a/Library/Homebrew/test/test_checksum.rb b/Library/Homebrew/test/checksum_test.rb
index 5505f6824..5505f6824 100644
--- a/Library/Homebrew/test/test_checksum.rb
+++ b/Library/Homebrew/test/checksum_test.rb
diff --git a/Library/Homebrew/test/test_checksum_verification.rb b/Library/Homebrew/test/checksum_verification_test.rb
index e25d08b83..9017b528d 100644
--- a/Library/Homebrew/test/test_checksum_verification.rb
+++ b/Library/Homebrew/test/checksum_verification_test.rb
@@ -12,7 +12,7 @@ class ChecksumVerificationTests < Homebrew::TestCase
def formula(&block)
super do
- url "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
instance_eval(&block)
end
end
diff --git a/Library/Homebrew/test/test_cleaner.rb b/Library/Homebrew/test/cleaner_test.rb
index 450a78d86..ac108421c 100644
--- a/Library/Homebrew/test/test_cleaner.rb
+++ b/Library/Homebrew/test/cleaner_test.rb
@@ -17,8 +17,8 @@ class CleanerTests < Homebrew::TestCase
def test_clean_file
@f.bin.mkpath
@f.lib.mkpath
- cp "#{TEST_DIRECTORY}/mach/a.out", @f.bin
- cp Dir["#{TEST_DIRECTORY}/mach/*.dylib"], @f.lib
+ cp "#{TEST_FIXTURE_DIR}/mach/a.out", @f.bin
+ cp Dir["#{TEST_FIXTURE_DIR}/mach/*.dylib"], @f.lib
Cleaner.new(@f).clean
diff --git a/Library/Homebrew/test/test_cleanup.rb b/Library/Homebrew/test/cleanup_test.rb
index dffcd12f2..bb8e1cdc6 100644
--- a/Library/Homebrew/test/test_cleanup.rb
+++ b/Library/Homebrew/test/cleanup_test.rb
@@ -1,9 +1,9 @@
require "testing_env"
-require "testball"
+require "test/support/fixtures/testball"
require "cleanup"
require "fileutils"
require "pathname"
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCleanup < IntegrationCommandTestCase
def test_cleanup
diff --git a/Library/Homebrew/test/test_command.rb b/Library/Homebrew/test/command_test.rb
index d05184631..d5c7aaa88 100644
--- a/Library/Homebrew/test/test_command.rb
+++ b/Library/Homebrew/test/command_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCommand < IntegrationCommandTestCase
def test_command
diff --git a/Library/Homebrew/test/test_commands.rb b/Library/Homebrew/test/commands_test.rb
index ef138049c..d44d2da0e 100644
--- a/Library/Homebrew/test/test_commands.rb
+++ b/Library/Homebrew/test/commands_test.rb
@@ -2,7 +2,7 @@ require "testing_env"
require "cmd/command"
require "cmd/commands"
require "fileutils"
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCommands < IntegrationCommandTestCase
def test_commands
diff --git a/Library/Homebrew/test/test_compiler_failure.rb b/Library/Homebrew/test/compiler_failure_test.rb
index c0b74d128..c0b74d128 100644
--- a/Library/Homebrew/test/test_compiler_failure.rb
+++ b/Library/Homebrew/test/compiler_failure_test.rb
diff --git a/Library/Homebrew/test/test_compiler_selector.rb b/Library/Homebrew/test/compiler_selector_test.rb
index b1591bdbe..b1591bdbe 100644
--- a/Library/Homebrew/test/test_compiler_selector.rb
+++ b/Library/Homebrew/test/compiler_selector_test.rb
diff --git a/Library/Homebrew/test/test_config.rb b/Library/Homebrew/test/config_test.rb
index 33a293735..81da4660a 100644
--- a/Library/Homebrew/test/test_config.rb
+++ b/Library/Homebrew/test/config_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestConfig < IntegrationCommandTestCase
def test_config
diff --git a/Library/Homebrew/test/test_create.rb b/Library/Homebrew/test/create_test.rb
index bb1a2cd2a..aeee428aa 100644
--- a/Library/Homebrew/test/test_create.rb
+++ b/Library/Homebrew/test/create_test.rb
@@ -1,8 +1,8 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCreate < IntegrationCommandTestCase
def test_create
- url = "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
+ url = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
cmd("create", url, "HOMEBREW_EDITOR" => "/bin/cat")
formula_file = CoreTap.new.formula_dir/"testball.rb"
diff --git a/Library/Homebrew/test/test_custom_command.rb b/Library/Homebrew/test/custom_command_test.rb
index bc27e2121..8d05bc6c7 100644
--- a/Library/Homebrew/test/test_custom_command.rb
+++ b/Library/Homebrew/test/custom_command_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestCustomCommand < IntegrationCommandTestCase
def test_custom_command
diff --git a/Library/Homebrew/test/test_dependencies.rb b/Library/Homebrew/test/dependencies_test.rb
index db3b78226..db3b78226 100644
--- a/Library/Homebrew/test/test_dependencies.rb
+++ b/Library/Homebrew/test/dependencies_test.rb
diff --git a/Library/Homebrew/test/test_dependency_collector.rb b/Library/Homebrew/test/dependency_collector_test.rb
index 1c7f70118..1c7f70118 100644
--- a/Library/Homebrew/test/test_dependency_collector.rb
+++ b/Library/Homebrew/test/dependency_collector_test.rb
diff --git a/Library/Homebrew/test/test_dependency_expansion.rb b/Library/Homebrew/test/dependency_expansion_test.rb
index 9d6de35e2..9d6de35e2 100644
--- a/Library/Homebrew/test/test_dependency_expansion.rb
+++ b/Library/Homebrew/test/dependency_expansion_test.rb
diff --git a/Library/Homebrew/test/test_dependency.rb b/Library/Homebrew/test/dependency_test.rb
index 65255995e..65255995e 100644
--- a/Library/Homebrew/test/test_dependency.rb
+++ b/Library/Homebrew/test/dependency_test.rb
diff --git a/Library/Homebrew/test/test_deps.rb b/Library/Homebrew/test/deps_test.rb
index 83cc9aa6a..01639857c 100644
--- a/Library/Homebrew/test/test_deps.rb
+++ b/Library/Homebrew/test/deps_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestDeps < IntegrationCommandTestCase
def test_deps
diff --git a/Library/Homebrew/test/test_desc.rb b/Library/Homebrew/test/desc_test.rb
index 075ea991a..2ba498135 100644
--- a/Library/Homebrew/test/test_desc.rb
+++ b/Library/Homebrew/test/desc_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestDesc < IntegrationCommandTestCase
def test_desc
diff --git a/Library/Homebrew/test/test_descriptions.rb b/Library/Homebrew/test/descriptions_test.rb
index de38fdbd1..de38fdbd1 100644
--- a/Library/Homebrew/test/test_descriptions.rb
+++ b/Library/Homebrew/test/descriptions_test.rb
diff --git a/Library/Homebrew/test/test_diagnostic.rb b/Library/Homebrew/test/diagnostic_test.rb
index aa2e44cfc..aa2e44cfc 100644
--- a/Library/Homebrew/test/test_diagnostic.rb
+++ b/Library/Homebrew/test/diagnostic_test.rb
diff --git a/Library/Homebrew/test/test_doctor.rb b/Library/Homebrew/test/doctor_test.rb
index ccb909dce..d2dc871f4 100644
--- a/Library/Homebrew/test/test_doctor.rb
+++ b/Library/Homebrew/test/doctor_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestDoctor < IntegrationCommandTestCase
def test_doctor
diff --git a/Library/Homebrew/test/test_download_strategies.rb b/Library/Homebrew/test/download_strategies_test.rb
index 87218fb12..87218fb12 100644
--- a/Library/Homebrew/test/test_download_strategies.rb
+++ b/Library/Homebrew/test/download_strategies_test.rb
diff --git a/Library/Homebrew/test/test_edit.rb b/Library/Homebrew/test/edit_test.rb
index 8d1437173..9b6ded651 100644
--- a/Library/Homebrew/test/test_edit.rb
+++ b/Library/Homebrew/test/edit_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestEdit < IntegrationCommandTestCase
def test_edit
diff --git a/Library/Homebrew/test/test_exceptions.rb b/Library/Homebrew/test/exceptions_test.rb
index 689531c6e..689531c6e 100644
--- a/Library/Homebrew/test/test_exceptions.rb
+++ b/Library/Homebrew/test/exceptions_test.rb
diff --git a/Library/Homebrew/test/test_fetch.rb b/Library/Homebrew/test/fetch_test.rb
index 7b57c6246..e08e545e3 100644
--- a/Library/Homebrew/test/test_fetch.rb
+++ b/Library/Homebrew/test/fetch_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestFetch < IntegrationCommandTestCase
def test_fetch
diff --git a/Library/Homebrew/test/test_formula_installer_bottle.rb b/Library/Homebrew/test/formula_installer_bottle_test.rb
index d83c856b7..6a891f159 100644
--- a/Library/Homebrew/test/test_formula_installer_bottle.rb
+++ b/Library/Homebrew/test/formula_installer_bottle_test.rb
@@ -3,8 +3,8 @@ require "formula"
require "formula_installer"
require "keg"
require "tab"
-require "testball"
-require "testball_bottle"
+require "test/support/fixtures/testball"
+require "test/support/fixtures/testball_bottle"
class InstallBottleTests < Homebrew::TestCase
def temporary_bottle_install(formula)
diff --git a/Library/Homebrew/test/test_formula_installer.rb b/Library/Homebrew/test/formula_installer_test.rb
index 18bd910a6..652548bd7 100644
--- a/Library/Homebrew/test/test_formula_installer.rb
+++ b/Library/Homebrew/test/formula_installer_test.rb
@@ -3,8 +3,8 @@ require "formula"
require "formula_installer"
require "keg"
require "tab"
-require "testball"
-require "testball_bottle"
+require "test/support/fixtures/testball"
+require "test/support/fixtures/testball_bottle"
class InstallTests < Homebrew::TestCase
def temporary_install(formula)
diff --git a/Library/Homebrew/test/test_formula_lock.rb b/Library/Homebrew/test/formula_lock_test.rb
index 80ee9dd25..80ee9dd25 100644
--- a/Library/Homebrew/test/test_formula_lock.rb
+++ b/Library/Homebrew/test/formula_lock_test.rb
diff --git a/Library/Homebrew/test/test_formula_pin.rb b/Library/Homebrew/test/formula_pin_test.rb
index 297d7703e..297d7703e 100644
--- a/Library/Homebrew/test/test_formula_pin.rb
+++ b/Library/Homebrew/test/formula_pin_test.rb
diff --git a/Library/Homebrew/test/test_formula_spec_selection.rb b/Library/Homebrew/test/formula_spec_selection_test.rb
index 7148df173..7148df173 100644
--- a/Library/Homebrew/test/test_formula_spec_selection.rb
+++ b/Library/Homebrew/test/formula_spec_selection_test.rb
diff --git a/Library/Homebrew/test/test_formula_support.rb b/Library/Homebrew/test/formula_support_test.rb
index c0a79f950..c0a79f950 100644
--- a/Library/Homebrew/test/test_formula_support.rb
+++ b/Library/Homebrew/test/formula_support_test.rb
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/formula_test.rb
index 4aa835590..eef60a3e5 100644
--- a/Library/Homebrew/test/test_formula.rb
+++ b/Library/Homebrew/test/formula_test.rb
@@ -1,5 +1,5 @@
require "testing_env"
-require "testball"
+require "test/support/fixtures/testball"
require "formula"
class FormulaTests < Homebrew::TestCase
diff --git a/Library/Homebrew/test/test_formula_validation.rb b/Library/Homebrew/test/formula_validation_test.rb
index c40eb6733..c40eb6733 100644
--- a/Library/Homebrew/test/test_formula_validation.rb
+++ b/Library/Homebrew/test/formula_validation_test.rb
diff --git a/Library/Homebrew/test/test_formulary.rb b/Library/Homebrew/test/formulary_test.rb
index c545ff84d..3d88c8407 100644
--- a/Library/Homebrew/test/test_formulary.rb
+++ b/Library/Homebrew/test/formulary_test.rb
@@ -18,11 +18,11 @@ class FormularyFactoryTest < Homebrew::TestCase
def setup
@name = "testball_bottle"
@path = CoreTap.new.formula_dir/"#{@name}.rb"
- @bottle_dir = Pathname.new("#{File.expand_path("..", __FILE__)}/bottles")
+ @bottle_dir = Pathname.new("#{TEST_FIXTURE_DIR}/bottles")
@bottle = @bottle_dir/"testball_bottle-0.1.#{Utils::Bottles.tag}.bottle.tar.gz"
@path.write <<-EOS.undent
class #{Formulary.class_s(@name)} < Formula
- url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
sha256 TESTBALL_SHA256
bottle do
diff --git a/Library/Homebrew/test/test_gpg2_requirement.rb b/Library/Homebrew/test/gpg2_requirement_test.rb
index fa7fc9ea4..fa7fc9ea4 100644
--- a/Library/Homebrew/test/test_gpg2_requirement.rb
+++ b/Library/Homebrew/test/gpg2_requirement_test.rb
diff --git a/Library/Homebrew/test/test_gpg.rb b/Library/Homebrew/test/gpg_test.rb
index 0374bdab4..0374bdab4 100644
--- a/Library/Homebrew/test/test_gpg.rb
+++ b/Library/Homebrew/test/gpg_test.rb
diff --git a/Library/Homebrew/test/test_hardware.rb b/Library/Homebrew/test/hardware_test.rb
index 2bea5387d..2bea5387d 100644
--- a/Library/Homebrew/test/test_hardware.rb
+++ b/Library/Homebrew/test/hardware_test.rb
diff --git a/Library/Homebrew/test/test_help.rb b/Library/Homebrew/test/help_test.rb
index 9c14f9b78..92dd99721 100644
--- a/Library/Homebrew/test/test_help.rb
+++ b/Library/Homebrew/test/help_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestHelp < IntegrationCommandTestCase
def test_help
diff --git a/Library/Homebrew/test/test_home.rb b/Library/Homebrew/test/home_test.rb
index 9c26353be..ff06b72c1 100644
--- a/Library/Homebrew/test/test_home.rb
+++ b/Library/Homebrew/test/home_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestHome < IntegrationCommandTestCase
def test_home
diff --git a/Library/Homebrew/test/test_info.rb b/Library/Homebrew/test/info_test.rb
index 35f9183e1..f71044bf0 100644
--- a/Library/Homebrew/test/test_info.rb
+++ b/Library/Homebrew/test/info_test.rb
@@ -1,7 +1,7 @@
require "testing_env"
require "cmd/info"
require "formula"
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestInfo < IntegrationCommandTestCase
def test_info
diff --git a/Library/Homebrew/test/test_inreplace.rb b/Library/Homebrew/test/inreplace_test.rb
index 0e62f9d3f..0e62f9d3f 100644
--- a/Library/Homebrew/test/test_inreplace.rb
+++ b/Library/Homebrew/test/inreplace_test.rb
diff --git a/Library/Homebrew/test/test_install.rb b/Library/Homebrew/test/install_test.rb
index 7135dddb2..fa1057a02 100644
--- a/Library/Homebrew/test/test_install.rb
+++ b/Library/Homebrew/test/install_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestInstall < IntegrationCommandTestCase
def test_install
diff --git a/Library/Homebrew/test/test_irb.rb b/Library/Homebrew/test/irb_test.rb
index bf35b6524..832ca39a5 100644
--- a/Library/Homebrew/test/test_irb.rb
+++ b/Library/Homebrew/test/irb_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestIrb < IntegrationCommandTestCase
def test_irb
diff --git a/Library/Homebrew/test/test_json.rb b/Library/Homebrew/test/json_test.rb
index 14d2f2b4c..14d2f2b4c 100644
--- a/Library/Homebrew/test/test_json.rb
+++ b/Library/Homebrew/test/json_test.rb
diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/keg_test.rb
index fdc739c9d..fdc739c9d 100644
--- a/Library/Homebrew/test/test_keg.rb
+++ b/Library/Homebrew/test/keg_test.rb
diff --git a/Library/Homebrew/test/test_language_go.rb b/Library/Homebrew/test/language_go_test.rb
index 692a5d2cc..692a5d2cc 100644
--- a/Library/Homebrew/test/test_language_go.rb
+++ b/Library/Homebrew/test/language_go_test.rb
diff --git a/Library/Homebrew/test/test_language_module_requirement.rb b/Library/Homebrew/test/language_module_requirement_test.rb
index dfa992287..dfa992287 100644
--- a/Library/Homebrew/test/test_language_module_requirement.rb
+++ b/Library/Homebrew/test/language_module_requirement_test.rb
diff --git a/Library/Homebrew/test/test_language_python.rb b/Library/Homebrew/test/language_python_test.rb
index d1e3867f7..d1e3867f7 100644
--- a/Library/Homebrew/test/test_language_python.rb
+++ b/Library/Homebrew/test/language_python_test.rb
diff --git a/Library/Homebrew/test/test_leaves.rb b/Library/Homebrew/test/leaves_test.rb
index 2a9bbadd9..f73fba1ea 100644
--- a/Library/Homebrew/test/test_leaves.rb
+++ b/Library/Homebrew/test/leaves_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestLeaves < IntegrationCommandTestCase
def test_leaves
diff --git a/Library/Homebrew/test/test_link.rb b/Library/Homebrew/test/link_test.rb
index 3f0507072..062caa0c0 100644
--- a/Library/Homebrew/test/test_link.rb
+++ b/Library/Homebrew/test/link_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestLink < IntegrationCommandTestCase
def test_link
diff --git a/Library/Homebrew/test/test_linkapps.rb b/Library/Homebrew/test/linkapps_test.rb
index b7c4cb811..4c5b8ec13 100644
--- a/Library/Homebrew/test/test_linkapps.rb
+++ b/Library/Homebrew/test/linkapps_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestLinkapps < IntegrationCommandTestCase
def test_linkapps
diff --git a/Library/Homebrew/test/test_list.rb b/Library/Homebrew/test/list_test.rb
index 1ffdb4528..3c691e3ad 100644
--- a/Library/Homebrew/test/test_list.rb
+++ b/Library/Homebrew/test/list_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestList < IntegrationCommandTestCase
def test_list
diff --git a/Library/Homebrew/test/test_log_formula.rb b/Library/Homebrew/test/log_formula_test.rb
index 34509bf72..bb6a1f661 100644
--- a/Library/Homebrew/test/test_log_formula.rb
+++ b/Library/Homebrew/test/log_formula_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestLogFormula < IntegrationCommandTestCase
def test_log_formula
diff --git a/Library/Homebrew/test/test_log.rb b/Library/Homebrew/test/log_test.rb
index b20a098fd..b2e150ccd 100644
--- a/Library/Homebrew/test/test_log.rb
+++ b/Library/Homebrew/test/log_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestLog < IntegrationCommandTestCase
def test_log
diff --git a/Library/Homebrew/test/test_migrate.rb b/Library/Homebrew/test/migrate_test.rb
index 53b32777a..17929d038 100644
--- a/Library/Homebrew/test/test_migrate.rb
+++ b/Library/Homebrew/test/migrate_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestMigrate < IntegrationCommandTestCase
def test_migrate
diff --git a/Library/Homebrew/test/test_migrator.rb b/Library/Homebrew/test/migrator_test.rb
index cefb8b7a3..8a2b6ad63 100644
--- a/Library/Homebrew/test/test_migrator.rb
+++ b/Library/Homebrew/test/migrator_test.rb
@@ -1,6 +1,6 @@
require "testing_env"
require "migrator"
-require "testball"
+require "test/support/fixtures/testball"
require "tab"
require "keg"
diff --git a/Library/Homebrew/test/test_missing.rb b/Library/Homebrew/test/missing_test.rb
index 565f413da..4f20d8a7a 100644
--- a/Library/Homebrew/test/test_missing.rb
+++ b/Library/Homebrew/test/missing_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestMissing < IntegrationCommandTestCase
def setup
diff --git a/Library/Homebrew/test/test_mpi_requirement.rb b/Library/Homebrew/test/mpi_requirement_test.rb
index e0f97e8ee..e0f97e8ee 100644
--- a/Library/Homebrew/test/test_mpi_requirement.rb
+++ b/Library/Homebrew/test/mpi_requirement_test.rb
diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/options_test.rb
index bfde7a9b6..e7189a604 100644
--- a/Library/Homebrew/test/test_options.rb
+++ b/Library/Homebrew/test/options_test.rb
@@ -1,6 +1,6 @@
require "testing_env"
require "options"
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestOptions < IntegrationCommandTestCase
def test_options
diff --git a/Library/Homebrew/test/test_os_mac_blacklist.rb b/Library/Homebrew/test/os/mac/blacklist_test.rb
index 26dd84ed9..26dd84ed9 100644
--- a/Library/Homebrew/test/test_os_mac_blacklist.rb
+++ b/Library/Homebrew/test/os/mac/blacklist_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_bottle_collector.rb b/Library/Homebrew/test/os/mac/bottle_collector_test.rb
index 2f88050ae..2f88050ae 100644
--- a/Library/Homebrew/test/test_os_mac_bottle_collector.rb
+++ b/Library/Homebrew/test/os/mac/bottle_collector_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_bottle_tag.rb b/Library/Homebrew/test/os/mac/bottle_tag_test.rb
index 996bd4d53..996bd4d53 100644
--- a/Library/Homebrew/test/test_os_mac_bottle_tag.rb
+++ b/Library/Homebrew/test/os/mac/bottle_tag_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_dependency_collector.rb b/Library/Homebrew/test/os/mac/dependency_collector_test.rb
index 4fdf3ebe4..4fdf3ebe4 100644
--- a/Library/Homebrew/test/test_os_mac_dependency_collector.rb
+++ b/Library/Homebrew/test/os/mac/dependency_collector_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_diagnostic.rb b/Library/Homebrew/test/os/mac/diagnostic_test.rb
index 655aa1d46..655aa1d46 100644
--- a/Library/Homebrew/test/test_os_mac_diagnostic.rb
+++ b/Library/Homebrew/test/os/mac/diagnostic_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_keg.rb b/Library/Homebrew/test/os/mac/keg_test.rb
index e79cbc921..e79cbc921 100644
--- a/Library/Homebrew/test/test_os_mac_keg.rb
+++ b/Library/Homebrew/test/os/mac/keg_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_language.rb b/Library/Homebrew/test/os/mac/language_test.rb
index e328db5e0..e328db5e0 100644
--- a/Library/Homebrew/test/test_os_mac_language.rb
+++ b/Library/Homebrew/test/os/mac/language_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_mach.rb b/Library/Homebrew/test/os/mac/mach_test.rb
index 404a21d60..a42f7316b 100644
--- a/Library/Homebrew/test/test_os_mac_mach.rb
+++ b/Library/Homebrew/test/os/mac/mach_test.rb
@@ -41,7 +41,7 @@ class MachOPathnameTests < Homebrew::TestCase
end
def test_mach_o_executable
- pn = Pathname.new("#{TEST_DIRECTORY}/mach/a.out")
+ pn = Pathname.new("#{TEST_FIXTURE_DIR}/mach/a.out")
assert_predicate pn, :universal?
refute_predicate pn, :i386?
refute_predicate pn, :x86_64?
@@ -93,7 +93,7 @@ class MachOPathnameTests < Homebrew::TestCase
end
def test_non_mach_o
- pn = Pathname.new("#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz")
+ pn = Pathname.new("#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz")
refute_predicate pn, :universal?
refute_predicate pn, :i386?
refute_predicate pn, :x86_64?
diff --git a/Library/Homebrew/test/test_os_mac_version.rb b/Library/Homebrew/test/os/mac/version_test.rb
index f702c7097..f702c7097 100644
--- a/Library/Homebrew/test/test_os_mac_version.rb
+++ b/Library/Homebrew/test/os/mac/version_test.rb
diff --git a/Library/Homebrew/test/test_os_mac_x11_requirement.rb b/Library/Homebrew/test/os/mac/x11_requirement_test.rb
index 102937cb5..102937cb5 100644
--- a/Library/Homebrew/test/test_os_mac_x11_requirement.rb
+++ b/Library/Homebrew/test/os/mac/x11_requirement_test.rb
diff --git a/Library/Homebrew/test/test_outdated.rb b/Library/Homebrew/test/outdated_test.rb
index cc0f024c8..3e7148ded 100644
--- a/Library/Homebrew/test/test_outdated.rb
+++ b/Library/Homebrew/test/outdated_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestOutdated < IntegrationCommandTestCase
def test_outdated
diff --git a/Library/Homebrew/test/test_patch.rb b/Library/Homebrew/test/patch_test.rb
index 62624720e..62624720e 100644
--- a/Library/Homebrew/test/test_patch.rb
+++ b/Library/Homebrew/test/patch_test.rb
diff --git a/Library/Homebrew/test/test_patching.rb b/Library/Homebrew/test/patching_test.rb
index 18b848b10..ac14c8e1e 100644
--- a/Library/Homebrew/test/test_patching.rb
+++ b/Library/Homebrew/test/patching_test.rb
@@ -2,12 +2,12 @@ require "testing_env"
require "formula"
class PatchingTests < Homebrew::TestCase
- TESTBALL_URL = "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz".freeze
- TESTBALL_PATCHES_URL = "file://#{TEST_DIRECTORY}/tarballs/testball-0.1-patches.tgz".freeze
- PATCH_URL_A = "file://#{TEST_DIRECTORY}/patches/noop-a.diff".freeze
- PATCH_URL_B = "file://#{TEST_DIRECTORY}/patches/noop-b.diff".freeze
- PATCH_A_CONTENTS = File.read "#{TEST_DIRECTORY}/patches/noop-a.diff"
- PATCH_B_CONTENTS = File.read "#{TEST_DIRECTORY}/patches/noop-b.diff"
+ TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz".freeze
+ TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz".freeze
+ PATCH_URL_A = "file://#{TEST_FIXTURE_DIR}/patches/noop-a.diff".freeze
+ PATCH_URL_B = "file://#{TEST_FIXTURE_DIR}/patches/noop-b.diff".freeze
+ PATCH_A_CONTENTS = File.read "#{TEST_FIXTURE_DIR}/patches/noop-a.diff"
+ PATCH_B_CONTENTS = File.read "#{TEST_FIXTURE_DIR}/patches/noop-b.diff"
APPLY_A = "noop-a.diff".freeze
APPLY_B = "noop-b.diff".freeze
APPLY_C = "noop-c.diff".freeze
diff --git a/Library/Homebrew/test/test_pathname.rb b/Library/Homebrew/test/pathname_test.rb
index 2f6360719..2f6360719 100644
--- a/Library/Homebrew/test/test_pathname.rb
+++ b/Library/Homebrew/test/pathname_test.rb
diff --git a/Library/Homebrew/test/test_pin_unpin.rb b/Library/Homebrew/test/pin_unpin_test.rb
index 37682d45e..65fb9e4da 100644
--- a/Library/Homebrew/test/test_pin_unpin.rb
+++ b/Library/Homebrew/test/pin_unpin_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestPinUnpin < IntegrationCommandTestCase
def test_pin_unpin
diff --git a/Library/Homebrew/test/test_pkg_version.rb b/Library/Homebrew/test/pkg_version_test.rb
index ff7896f8b..ff7896f8b 100644
--- a/Library/Homebrew/test/test_pkg_version.rb
+++ b/Library/Homebrew/test/pkg_version_test.rb
diff --git a/Library/Homebrew/test/test_prefix_formula.rb b/Library/Homebrew/test/prefix_formula_test.rb
index d76a966d7..eb5970d3e 100644
--- a/Library/Homebrew/test/test_prefix_formula.rb
+++ b/Library/Homebrew/test/prefix_formula_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestPrefixFormula < IntegrationCommandTestCase
def test_prefix_formula
diff --git a/Library/Homebrew/test/test_prefix.rb b/Library/Homebrew/test/prefix_test.rb
index 4aa63fa07..a3ae75542 100644
--- a/Library/Homebrew/test/test_prefix.rb
+++ b/Library/Homebrew/test/prefix_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestPrefix < IntegrationCommandTestCase
def test_prefix
diff --git a/Library/Homebrew/test/test_prune.rb b/Library/Homebrew/test/prune_test.rb
index 293a3746d..8fa5df7b7 100644
--- a/Library/Homebrew/test/test_prune.rb
+++ b/Library/Homebrew/test/prune_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestPrune < IntegrationCommandTestCase
def test_prune
diff --git a/Library/Homebrew/test/test_pull_offline.rb b/Library/Homebrew/test/pull_offline_test.rb
index 2716af346..c9d46cd74 100644
--- a/Library/Homebrew/test/test_pull_offline.rb
+++ b/Library/Homebrew/test/pull_offline_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestPullOffline < IntegrationCommandTestCase
def test_pull_offline
diff --git a/Library/Homebrew/test/test_pull.rb b/Library/Homebrew/test/pull_test.rb
index 9707ff8a8..445d73cb1 100644
--- a/Library/Homebrew/test/test_pull.rb
+++ b/Library/Homebrew/test/pull_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestPull < IntegrationCommandTestCase
def test_pull
diff --git a/Library/Homebrew/test/test_readall.rb b/Library/Homebrew/test/readall_test.rb
index d0c078e49..3eec79dd8 100644
--- a/Library/Homebrew/test/test_readall.rb
+++ b/Library/Homebrew/test/readall_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestReadall < IntegrationCommandTestCase
def test_readall
diff --git a/Library/Homebrew/test/test_reinstall_pinned.rb b/Library/Homebrew/test/reinstall_pinned_test.rb
index c9cb8a849..80f5518ea 100644
--- a/Library/Homebrew/test/test_reinstall_pinned.rb
+++ b/Library/Homebrew/test/reinstall_pinned_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestReinstallPinned < IntegrationCommandTestCase
def test_reinstall_pinned
diff --git a/Library/Homebrew/test/test_reinstall.rb b/Library/Homebrew/test/reinstall_test.rb
index d07a96051..73877b35d 100644
--- a/Library/Homebrew/test/test_reinstall.rb
+++ b/Library/Homebrew/test/reinstall_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestReinstall < IntegrationCommandTestCase
def test_reinstall
diff --git a/Library/Homebrew/test/test_repository.rb b/Library/Homebrew/test/repository_test.rb
index 2029876ad..77967a58d 100644
--- a/Library/Homebrew/test/test_repository.rb
+++ b/Library/Homebrew/test/repository_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestRepository < IntegrationCommandTestCase
def test_repository
diff --git a/Library/Homebrew/test/test_requirement.rb b/Library/Homebrew/test/requirement_test.rb
index 580d42bfa..580d42bfa 100644
--- a/Library/Homebrew/test/test_requirement.rb
+++ b/Library/Homebrew/test/requirement_test.rb
diff --git a/Library/Homebrew/test/test_resource.rb b/Library/Homebrew/test/resource_test.rb
index c1b526cb2..c1b526cb2 100644
--- a/Library/Homebrew/test/test_resource.rb
+++ b/Library/Homebrew/test/resource_test.rb
diff --git a/Library/Homebrew/test/test_sandbox.rb b/Library/Homebrew/test/sandbox_test.rb
index 2a062cb10..2a062cb10 100644
--- a/Library/Homebrew/test/test_sandbox.rb
+++ b/Library/Homebrew/test/sandbox_test.rb
diff --git a/Library/Homebrew/test/test_search_remote_tap.rb b/Library/Homebrew/test/search_remote_tap_test.rb
index 9dd9ee654..9dd9ee654 100644
--- a/Library/Homebrew/test/test_search_remote_tap.rb
+++ b/Library/Homebrew/test/search_remote_tap_test.rb
diff --git a/Library/Homebrew/test/test_search.rb b/Library/Homebrew/test/search_test.rb
index 8310d1c2b..70b6f01fb 100644
--- a/Library/Homebrew/test/test_search.rb
+++ b/Library/Homebrew/test/search_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestSearch < IntegrationCommandTestCase
def test_search
diff --git a/Library/Homebrew/test/test_services.rb b/Library/Homebrew/test/services_test.rb
index b5ccb7c77..280aeb9f4 100644
--- a/Library/Homebrew/test/test_services.rb
+++ b/Library/Homebrew/test/services_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestServices < IntegrationCommandTestCase
def test_services
diff --git a/Library/Homebrew/test/test_sh.rb b/Library/Homebrew/test/sh_test.rb
index 449b7b5b3..48fcdc54a 100644
--- a/Library/Homebrew/test/test_sh.rb
+++ b/Library/Homebrew/test/sh_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestSh < IntegrationCommandTestCase
def test_sh
diff --git a/Library/Homebrew/test/test_shell.rb b/Library/Homebrew/test/shell_test.rb
index 877acb5c8..877acb5c8 100644
--- a/Library/Homebrew/test/test_shell.rb
+++ b/Library/Homebrew/test/shell_test.rb
diff --git a/Library/Homebrew/test/test_software_spec.rb b/Library/Homebrew/test/software_spec_test.rb
index d9226f8c3..d9226f8c3 100644
--- a/Library/Homebrew/test/test_software_spec.rb
+++ b/Library/Homebrew/test/software_spec_test.rb
diff --git a/Library/Homebrew/test/test_stdlib.rb b/Library/Homebrew/test/stdlib_test.rb
index ee53e7c8c..ee53e7c8c 100644
--- a/Library/Homebrew/test/test_stdlib.rb
+++ b/Library/Homebrew/test/stdlib_test.rb
diff --git a/Library/Homebrew/test/test_string.rb b/Library/Homebrew/test/string_test.rb
index 497c4badb..497c4badb 100644
--- a/Library/Homebrew/test/test_string.rb
+++ b/Library/Homebrew/test/string_test.rb
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
index 3e989830b..3e989830b 120000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.el_capitan.bottle.tar.gz
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
index 3e989830b..3e989830b 120000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.linux_x86_64.bottle.tar.gz
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
index 3e989830b..3e989830b 120000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.macintosh_intel.bottle.tar.gz
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
index 3e989830b..3e989830b 120000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mavericks.bottle.tar.gz
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
index 3e989830b..3e989830b 120000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.mountain_lion.bottle.tar.gz
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
index 3e989830b..3e989830b 120000
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
diff --git a/Library/Homebrew/test/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz
index d88838a94..d88838a94 100644
--- a/Library/Homebrew/test/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/bottles/testball_bottle-0.1.yosemite.bottle.tar.gz
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/AppWithBinary.zip b/Library/Homebrew/test/support/fixtures/cask/AppWithBinary.zip
index 4a5b318ba..4a5b318ba 100644
--- a/Library/Homebrew/test/fixtures/cask/AppWithBinary.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/AppWithBinary.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip b/Library/Homebrew/test/support/fixtures/cask/AppWithEmbeddedBinary.zip
index 7c708038c..7c708038c 100644
--- a/Library/Homebrew/test/fixtures/cask/AppWithEmbeddedBinary.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/AppWithEmbeddedBinary.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/MyFancyApp.zip b/Library/Homebrew/test/support/fixtures/cask/MyFancyApp.zip
index ba09ee681..ba09ee681 100644
--- a/Library/Homebrew/test/fixtures/cask/MyFancyApp.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/MyFancyApp.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip b/Library/Homebrew/test/support/fixtures/cask/MyFancyPkg.zip
index ec4f97f07..ec4f97f07 100644
--- a/Library/Homebrew/test/fixtures/cask/MyFancyPkg.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/MyFancyPkg.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip b/Library/Homebrew/test/support/fixtures/cask/NestedApp.dmg.zip
index ae6686c7e..ae6686c7e 100644
--- a/Library/Homebrew/test/fixtures/cask/NestedApp.dmg.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/NestedApp.dmg.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeine-suite.zip b/Library/Homebrew/test/support/fixtures/cask/caffeine-suite.zip
index c38f771ae..c38f771ae 100644
--- a/Library/Homebrew/test/fixtures/cask/caffeine-suite.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/caffeine-suite.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeine.zip b/Library/Homebrew/test/support/fixtures/cask/caffeine.zip
index 99d61bbfb..99d61bbfb 100644
--- a/Library/Homebrew/test/fixtures/cask/caffeine.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/caffeine.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip b/Library/Homebrew/test/support/fixtures/cask/caffeines-subdir.zip
index ce5064d09..ce5064d09 100644
--- a/Library/Homebrew/test/fixtures/cask/caffeines-subdir.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/caffeines-subdir.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/caffeines.zip b/Library/Homebrew/test/support/fixtures/cask/caffeines.zip
index 372fcc522..372fcc522 100644
--- a/Library/Homebrew/test/fixtures/cask/caffeines.zip
+++ b/Library/Homebrew/test/support/fixtures/cask/caffeines.zip
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.7z b/Library/Homebrew/test/support/fixtures/cask/container.7z
index 30dbe24f7..30dbe24f7 100644
--- a/Library/Homebrew/test/fixtures/cask/container.7z
+++ b/Library/Homebrew/test/support/fixtures/cask/container.7z
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.air b/Library/Homebrew/test/support/fixtures/cask/container.air
index 64005aea3..64005aea3 100644
--- a/Library/Homebrew/test/fixtures/cask/container.air
+++ b/Library/Homebrew/test/support/fixtures/cask/container.air
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.bz2 b/Library/Homebrew/test/support/fixtures/cask/container.bz2
index 6ec60f31f..6ec60f31f 100755
--- a/Library/Homebrew/test/fixtures/cask/container.bz2
+++ b/Library/Homebrew/test/support/fixtures/cask/container.bz2
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.cab b/Library/Homebrew/test/support/fixtures/cask/container.cab
index edc741aa1..edc741aa1 100644
--- a/Library/Homebrew/test/fixtures/cask/container.cab
+++ b/Library/Homebrew/test/support/fixtures/cask/container.cab
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.dmg b/Library/Homebrew/test/support/fixtures/cask/container.dmg
index 3b3cbf51c..3b3cbf51c 100644
--- a/Library/Homebrew/test/fixtures/cask/container.dmg
+++ b/Library/Homebrew/test/support/fixtures/cask/container.dmg
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.gz b/Library/Homebrew/test/support/fixtures/cask/container.gz
index 67ede6b96..67ede6b96 100755
--- a/Library/Homebrew/test/fixtures/cask/container.gz
+++ b/Library/Homebrew/test/support/fixtures/cask/container.gz
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.lzma b/Library/Homebrew/test/support/fixtures/cask/container.lzma
index 2ff7ccee7..2ff7ccee7 100755
--- a/Library/Homebrew/test/fixtures/cask/container.lzma
+++ b/Library/Homebrew/test/support/fixtures/cask/container.lzma
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.pkg b/Library/Homebrew/test/support/fixtures/cask/container.pkg
index 274f27e7a..274f27e7a 100644
--- a/Library/Homebrew/test/fixtures/cask/container.pkg
+++ b/Library/Homebrew/test/support/fixtures/cask/container.pkg
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.rar b/Library/Homebrew/test/support/fixtures/cask/container.rar
index 7477c3bb4..7477c3bb4 100644
--- a/Library/Homebrew/test/fixtures/cask/container.rar
+++ b/Library/Homebrew/test/support/fixtures/cask/container.rar
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.sit b/Library/Homebrew/test/support/fixtures/cask/container.sit
index 3e29d21dc..3e29d21dc 100755
--- a/Library/Homebrew/test/fixtures/cask/container.sit
+++ b/Library/Homebrew/test/support/fixtures/cask/container.sit
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.tar.gz b/Library/Homebrew/test/support/fixtures/cask/container.tar.gz
index c464fb413..c464fb413 100644
--- a/Library/Homebrew/test/fixtures/cask/container.tar.gz
+++ b/Library/Homebrew/test/support/fixtures/cask/container.tar.gz
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.xar b/Library/Homebrew/test/support/fixtures/cask/container.xar
index 563a5ba1e..563a5ba1e 100644
--- a/Library/Homebrew/test/fixtures/cask/container.xar
+++ b/Library/Homebrew/test/support/fixtures/cask/container.xar
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/container.xz b/Library/Homebrew/test/support/fixtures/cask/container.xz
index 74db22090..74db22090 100755
--- a/Library/Homebrew/test/fixtures/cask/container.xz
+++ b/Library/Homebrew/test/support/fixtures/cask/container.xz
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore b/Library/Homebrew/test/support/fixtures/cask/empty_directory/.gitignore
index e69de29bb..e69de29bb 100644
--- a/Library/Homebrew/test/fixtures/cask/empty_directory/.gitignore
+++ b/Library/Homebrew/test/support/fixtures/cask/empty_directory/.gitignore
diff --git a/Library/Homebrew/test/fixtures/cask/naked_executable b/Library/Homebrew/test/support/fixtures/cask/naked_executable
index 039e4d006..039e4d006 100755
--- a/Library/Homebrew/test/fixtures/cask/naked_executable
+++ b/Library/Homebrew/test/support/fixtures/cask/naked_executable
diff --git a/Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg b/Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg
index e72afe027..e72afe027 100644
--- a/Library/Homebrew/test/fixtures/cask/transmission-2.61.dmg
+++ b/Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg
Binary files differ
diff --git a/Library/Homebrew/test/mach/a.out b/Library/Homebrew/test/support/fixtures/mach/a.out
index 18e0e982f..18e0e982f 100755
--- a/Library/Homebrew/test/mach/a.out
+++ b/Library/Homebrew/test/support/fixtures/mach/a.out
Binary files differ
diff --git a/Library/Homebrew/test/mach/fat.bundle b/Library/Homebrew/test/support/fixtures/mach/fat.bundle
index f60f1e8bb..f60f1e8bb 100644
--- a/Library/Homebrew/test/mach/fat.bundle
+++ b/Library/Homebrew/test/support/fixtures/mach/fat.bundle
Binary files differ
diff --git a/Library/Homebrew/test/mach/fat.dylib b/Library/Homebrew/test/support/fixtures/mach/fat.dylib
index 6886a6a8b..6886a6a8b 100644
--- a/Library/Homebrew/test/mach/fat.dylib
+++ b/Library/Homebrew/test/support/fixtures/mach/fat.dylib
Binary files differ
diff --git a/Library/Homebrew/test/mach/i386.bundle b/Library/Homebrew/test/support/fixtures/mach/i386.bundle
index b6f94710d..b6f94710d 100644
--- a/Library/Homebrew/test/mach/i386.bundle
+++ b/Library/Homebrew/test/support/fixtures/mach/i386.bundle
Binary files differ
diff --git a/Library/Homebrew/test/mach/i386.dylib b/Library/Homebrew/test/support/fixtures/mach/i386.dylib
index 0304dca01..0304dca01 100644
--- a/Library/Homebrew/test/mach/i386.dylib
+++ b/Library/Homebrew/test/support/fixtures/mach/i386.dylib
Binary files differ
diff --git a/Library/Homebrew/test/mach/x86_64.bundle b/Library/Homebrew/test/support/fixtures/mach/x86_64.bundle
index d1bde419f..d1bde419f 100644
--- a/Library/Homebrew/test/mach/x86_64.bundle
+++ b/Library/Homebrew/test/support/fixtures/mach/x86_64.bundle
Binary files differ
diff --git a/Library/Homebrew/test/mach/x86_64.dylib b/Library/Homebrew/test/support/fixtures/mach/x86_64.dylib
index 781b41cb4..781b41cb4 100644
--- a/Library/Homebrew/test/mach/x86_64.dylib
+++ b/Library/Homebrew/test/support/fixtures/mach/x86_64.dylib
Binary files differ
diff --git a/Library/Homebrew/test/patches/noop-a.diff b/Library/Homebrew/test/support/fixtures/patches/noop-a.diff
index 7b57f8fc9..7b57f8fc9 100644
--- a/Library/Homebrew/test/patches/noop-a.diff
+++ b/Library/Homebrew/test/support/fixtures/patches/noop-a.diff
diff --git a/Library/Homebrew/test/patches/noop-b.diff b/Library/Homebrew/test/support/fixtures/patches/noop-b.diff
index bc081ca82..bc081ca82 100644
--- a/Library/Homebrew/test/patches/noop-b.diff
+++ b/Library/Homebrew/test/support/fixtures/patches/noop-b.diff
diff --git a/Library/Homebrew/test/patches/noop-c.diff b/Library/Homebrew/test/support/fixtures/patches/noop-c.diff
index 6d0de5b7b..6d0de5b7b 100644
--- a/Library/Homebrew/test/patches/noop-c.diff
+++ b/Library/Homebrew/test/support/fixtures/patches/noop-c.diff
diff --git a/Library/Homebrew/test/fixtures/receipt.json b/Library/Homebrew/test/support/fixtures/receipt.json
index 404251026..404251026 100644
--- a/Library/Homebrew/test/fixtures/receipt.json
+++ b/Library/Homebrew/test/support/fixtures/receipt.json
diff --git a/Library/Homebrew/test/fixtures/receipt_old.json b/Library/Homebrew/test/support/fixtures/receipt_old.json
index 955d56b47..955d56b47 100644
--- a/Library/Homebrew/test/fixtures/receipt_old.json
+++ b/Library/Homebrew/test/support/fixtures/receipt_old.json
diff --git a/Library/Homebrew/test/tarballs/testball-0.1-patches.tgz b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-patches.tgz
index 4b43f535e..4b43f535e 100644
--- a/Library/Homebrew/test/tarballs/testball-0.1-patches.tgz
+++ b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-patches.tgz
Binary files differ
diff --git a/Library/Homebrew/test/tarballs/testball-0.1.tbz b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1.tbz
index c7e1af1f4..c7e1af1f4 100644
--- a/Library/Homebrew/test/tarballs/testball-0.1.tbz
+++ b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1.tbz
Binary files differ
diff --git a/Library/Homebrew/test/tarballs/testbottest-0.1.tbz b/Library/Homebrew/test/support/fixtures/tarballs/testbottest-0.1.tbz
index 83f7ab1dd..83f7ab1dd 100644
--- a/Library/Homebrew/test/tarballs/testbottest-0.1.tbz
+++ b/Library/Homebrew/test/support/fixtures/tarballs/testbottest-0.1.tbz
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.diff b/Library/Homebrew/test/support/fixtures/test.diff
index 7b57f8fc9..7b57f8fc9 100644
--- a/Library/Homebrew/test/fixtures/test.diff
+++ b/Library/Homebrew/test/support/fixtures/test.diff
diff --git a/Library/Homebrew/test/fixtures/test.eps b/Library/Homebrew/test/support/fixtures/test.eps
index 2832613e7..2832613e7 100644
--- a/Library/Homebrew/test/fixtures/test.eps
+++ b/Library/Homebrew/test/support/fixtures/test.eps
diff --git a/Library/Homebrew/test/fixtures/test.gif b/Library/Homebrew/test/support/fixtures/test.gif
index 0589d2082..0589d2082 100644
--- a/Library/Homebrew/test/fixtures/test.gif
+++ b/Library/Homebrew/test/support/fixtures/test.gif
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.ico b/Library/Homebrew/test/support/fixtures/test.ico
index 714f3478d..714f3478d 100644
--- a/Library/Homebrew/test/fixtures/test.ico
+++ b/Library/Homebrew/test/support/fixtures/test.ico
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.jpg b/Library/Homebrew/test/support/fixtures/test.jpg
index 1adaa50a6..1adaa50a6 100644
--- a/Library/Homebrew/test/fixtures/test.jpg
+++ b/Library/Homebrew/test/support/fixtures/test.jpg
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.m4a b/Library/Homebrew/test/support/fixtures/test.m4a
index 7650fc482..7650fc482 100644
--- a/Library/Homebrew/test/fixtures/test.m4a
+++ b/Library/Homebrew/test/support/fixtures/test.m4a
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.mp3 b/Library/Homebrew/test/support/fixtures/test.mp3
index a01322383..a01322383 100644
--- a/Library/Homebrew/test/fixtures/test.mp3
+++ b/Library/Homebrew/test/support/fixtures/test.mp3
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.pcap b/Library/Homebrew/test/support/fixtures/test.pcap
index 671197e8a..671197e8a 100644
--- a/Library/Homebrew/test/fixtures/test.pcap
+++ b/Library/Homebrew/test/support/fixtures/test.pcap
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.pdf b/Library/Homebrew/test/support/fixtures/test.pdf
index 1f2ac6390..1f2ac6390 100644
--- a/Library/Homebrew/test/fixtures/test.pdf
+++ b/Library/Homebrew/test/support/fixtures/test.pdf
diff --git a/Library/Homebrew/test/fixtures/test.png b/Library/Homebrew/test/support/fixtures/test.png
index 18d7a15a9..18d7a15a9 100644
--- a/Library/Homebrew/test/fixtures/test.png
+++ b/Library/Homebrew/test/support/fixtures/test.png
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.ps b/Library/Homebrew/test/support/fixtures/test.ps
index 68aae0621..68aae0621 100644
--- a/Library/Homebrew/test/fixtures/test.ps
+++ b/Library/Homebrew/test/support/fixtures/test.ps
diff --git a/Library/Homebrew/test/fixtures/test.svg b/Library/Homebrew/test/support/fixtures/test.svg
index 1869e624c..1869e624c 100644
--- a/Library/Homebrew/test/fixtures/test.svg
+++ b/Library/Homebrew/test/support/fixtures/test.svg
diff --git a/Library/Homebrew/test/fixtures/test.tiff b/Library/Homebrew/test/support/fixtures/test.tiff
index ae756b264..ae756b264 100644
--- a/Library/Homebrew/test/fixtures/test.tiff
+++ b/Library/Homebrew/test/support/fixtures/test.tiff
Binary files differ
diff --git a/Library/Homebrew/test/fixtures/test.wav b/Library/Homebrew/test/support/fixtures/test.wav
index c846b8a9b..c846b8a9b 100644
--- a/Library/Homebrew/test/fixtures/test.wav
+++ b/Library/Homebrew/test/support/fixtures/test.wav
Binary files differ
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/support/fixtures/testball.rb
index cce09738d..ba725f51e 100644
--- a/Library/Homebrew/test/testball.rb
+++ b/Library/Homebrew/test/support/fixtures/testball.rb
@@ -1,7 +1,7 @@
class Testball < Formula
def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
self.class.instance_eval do
- stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
+ stable.url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
stable.sha256 TESTBALL_SHA256
end
super
diff --git a/Library/Homebrew/test/testball_bottle.rb b/Library/Homebrew/test/support/fixtures/testball_bottle.rb
index 769f615aa..9453255e6 100644
--- a/Library/Homebrew/test/testball_bottle.rb
+++ b/Library/Homebrew/test/support/fixtures/testball_bottle.rb
@@ -1,11 +1,11 @@
class TestballBottle < Formula
def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable, alias_path: nil)
self.class.instance_eval do
- stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
+ stable.url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
stable.sha256 TESTBALL_SHA256
stable.bottle do
cellar :any_skip_relocation
- root_url "file://#{File.expand_path("..", __FILE__)}/bottles"
+ root_url "file://#{TEST_FIXTURE_DIR}/bottles"
sha256 "9abc8ce779067e26556002c4ca6b9427b9874d25f0cafa7028e05b5c5c410cb4" => Utils::Bottles.tag
end
cxxstdlib_check :skip
diff --git a/Library/Homebrew/test/testbottest.rb b/Library/Homebrew/test/support/fixtures/testbottest.rb
index f7695cab5..28b88567e 100644
--- a/Library/Homebrew/test/testbottest.rb
+++ b/Library/Homebrew/test/support/fixtures/testbottest.rb
@@ -1,7 +1,7 @@
class Testbottest < Formula
desc "Minimal C program and Makefile used for testing Homebrew."
homepage "https://github.com/Homebrew/brew"
- url "file://#{File.expand_path("..", __FILE__)}/tarballs/testbottest-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testbottest-0.1.tbz"
sha256 "78b54d8f31585c9773bed12b4aa4ab2ce458ebd044b9406cb24d40aa5107f082"
def install
diff --git a/Library/Homebrew/test/fixtures/updater_fixture.yaml b/Library/Homebrew/test/support/fixtures/updater_fixture.yaml
index 06a6a0c7f..06a6a0c7f 100644
--- a/Library/Homebrew/test/fixtures/updater_fixture.yaml
+++ b/Library/Homebrew/test/support/fixtures/updater_fixture.yaml
diff --git a/Library/Homebrew/test/helper/env.rb b/Library/Homebrew/test/support/helper/env.rb
index 904a1d4c7..904a1d4c7 100644
--- a/Library/Homebrew/test/helper/env.rb
+++ b/Library/Homebrew/test/support/helper/env.rb
diff --git a/Library/Homebrew/test/support/helper/fs_leak_logger.rb b/Library/Homebrew/test/support/helper/fs_leak_logger.rb
new file mode 100644
index 000000000..f6a02dbc0
--- /dev/null
+++ b/Library/Homebrew/test/support/helper/fs_leak_logger.rb
@@ -0,0 +1,27 @@
+module Test
+ module Helper
+ module FSLeakLogger
+ def self.included(klass)
+ require "find"
+ logdir = HOMEBREW_LIBRARY_PATH.join("tmp")
+ logdir.mkdir unless logdir.directory?
+ @@log = File.open(logdir.join("fs_leak.log"), "w")
+ klass.make_my_diffs_pretty!
+ end
+
+ def before_setup
+ @__files_before_test = []
+ Find.find(TEST_TMPDIR) { |f| @__files_before_test << f.sub(TEST_TMPDIR, "") }
+ super
+ end
+
+ def after_teardown
+ super
+ files_after_test = []
+ Find.find(TEST_TMPDIR) { |f| files_after_test << f.sub(TEST_TMPDIR, "") }
+ return if @__files_before_test == files_after_test
+ @@log.puts location, diff(@__files_before_test, files_after_test)
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/test/helper/integration_command_test_case.rb b/Library/Homebrew/test/support/helper/integration_command_test_case.rb
index 2f137e14a..5940fd84b 100644
--- a/Library/Homebrew/test/helper/integration_command_test_case.rb
+++ b/Library/Homebrew/test/support/helper/integration_command_test_case.rb
@@ -1,8 +1,8 @@
require "bundler"
-require "testing_env"
require "fileutils"
require "pathname"
require "formula"
+require "test/support/helper/test_case"
class IntegrationCommandTestCase < Homebrew::TestCase
def setup
@@ -21,6 +21,7 @@ class IntegrationCommandTestCase < Homebrew::TestCase
HOMEBREW_LOCK_DIR.children,
HOMEBREW_LOGS.children,
HOMEBREW_TEMP.children,
+ HOMEBREW_PREFIX/".git",
HOMEBREW_PREFIX/"bin",
HOMEBREW_PREFIX/"share",
HOMEBREW_PREFIX/"opt",
@@ -59,7 +60,8 @@ class IntegrationCommandTestCase < Homebrew::TestCase
env = args.last.is_a?(Hash) ? args.pop : {}
cmd_args = %W[
-W0
- -I#{HOMEBREW_LIBRARY_PATH}/test/lib
+ -I#{HOMEBREW_LIBRARY_PATH}/test/support/lib
+ -I#{HOMEBREW_LIBRARY_PATH}
-rconfig
]
if ENV["HOMEBREW_TESTS_COVERAGE"]
@@ -70,7 +72,7 @@ class IntegrationCommandTestCase < Homebrew::TestCase
cmd_args << "-rbundler/setup"
cmd_args << "-rsimplecov"
end
- cmd_args << "-rintegration_mocks"
+ cmd_args << "-rtest/support/helper/integration_mocks"
cmd_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s
cmd_args += args
developer = ENV["HOMEBREW_DEVELOPER"]
@@ -125,7 +127,7 @@ class IntegrationCommandTestCase < Homebrew::TestCase
content = <<-EOS.undent
desc "Some test"
homepage "https://example.com/#{name}"
- url "file://#{File.expand_path("../..", __FILE__)}/tarballs/testball-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
sha256 "#{TESTBALL_SHA256}"
option "with-foo", "Build with foo"
@@ -195,6 +197,6 @@ class IntegrationCommandTestCase < Homebrew::TestCase
end
def testball
- "#{File.expand_path("../..", __FILE__)}/testball.rb"
+ "#{TEST_FIXTURE_DIR}/testball.rb"
end
end
diff --git a/Library/Homebrew/test/lib/integration_mocks.rb b/Library/Homebrew/test/support/helper/integration_mocks.rb
index 6effb0cde..6effb0cde 100644
--- a/Library/Homebrew/test/lib/integration_mocks.rb
+++ b/Library/Homebrew/test/support/helper/integration_mocks.rb
diff --git a/Library/Homebrew/test/helper/shutup.rb b/Library/Homebrew/test/support/helper/shutup.rb
index fa5f08d31..fa5f08d31 100644
--- a/Library/Homebrew/test/helper/shutup.rb
+++ b/Library/Homebrew/test/support/helper/shutup.rb
diff --git a/Library/Homebrew/test/support/helper/test_case.rb b/Library/Homebrew/test/support/helper/test_case.rb
new file mode 100644
index 000000000..60c91e7bb
--- /dev/null
+++ b/Library/Homebrew/test/support/helper/test_case.rb
@@ -0,0 +1,64 @@
+module Homebrew
+ class TestCase < ::Minitest::Test
+ require "test/support/helper/env"
+ require "test/support/helper/fs_leak_logger"
+ require "test/support/helper/shutup"
+ require "test/support/helper/version_assertions"
+ include Test::Helper::Env
+ include Test::Helper::FSLeakLogger
+ include Test::Helper::Shutup
+ include Test::Helper::VersionAssertions
+
+ TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze
+ TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze
+
+ def formula(name = "formula_name", path = Formulary.core_path(name), spec = :stable, alias_path: nil, &block)
+ @_f = Class.new(Formula, &block).new(name, path, spec, alias_path: alias_path)
+ end
+
+ def mktmpdir(prefix_suffix = nil, &block)
+ Dir.mktmpdir(prefix_suffix, HOMEBREW_TEMP, &block)
+ end
+
+ def needs_compat
+ skip "Requires compat/ code" if ENV["HOMEBREW_NO_COMPAT"]
+ end
+
+ def needs_python
+ skip "Requires Python" unless which("python")
+ end
+
+ def assert_nothing_raised
+ yield
+ end
+
+ def assert_eql(exp, act, msg = nil)
+ msg = message(msg, "") { diff exp, act }
+ assert exp.eql?(act), msg
+ end
+
+ def refute_eql(exp, act, msg = nil)
+ msg = message(msg) do
+ "Expected #{mu_pp(act)} to not be eql to #{mu_pp(exp)}"
+ end
+ refute exp.eql?(act), msg
+ end
+
+ def dylib_path(name)
+ Pathname.new("#{TEST_FIXTURE_DIR}/mach/#{name}.dylib")
+ end
+
+ def bundle_path(name)
+ Pathname.new("#{TEST_FIXTURE_DIR}/mach/#{name}.bundle")
+ end
+
+ # Use a stubbed {Formulary::FormulaLoader} to make a given formula be found
+ # when loading from {Formulary} with `ref`.
+ def stub_formula_loader(formula, ref = formula.full_name)
+ loader = mock
+ loader.stubs(:get_formula).returns(formula)
+ Formulary.stubs(:loader_for).with(ref, from: :keg).returns(loader)
+ Formulary.stubs(:loader_for).with(ref, from: nil).returns(loader)
+ end
+ end
+end
diff --git a/Library/Homebrew/test/support/helper/version_assertions.rb b/Library/Homebrew/test/support/helper/version_assertions.rb
new file mode 100644
index 000000000..dc240d643
--- /dev/null
+++ b/Library/Homebrew/test/support/helper/version_assertions.rb
@@ -0,0 +1,23 @@
+require "rubygems"
+
+module Test
+ module Helper
+ module VersionAssertions
+ def version(v)
+ Version.create(v)
+ end
+
+ def assert_version_equal(expected, actual)
+ assert_equal Version.create(expected), actual
+ end
+
+ def assert_version_detected(expected, url, specs = {})
+ assert_equal expected, Version.detect(url, specs).to_s
+ end
+
+ def assert_version_nil(url)
+ assert Version.parse(url).null?
+ end
+ end
+ end
+end
diff --git a/Library/Homebrew/test/lib/config.rb b/Library/Homebrew/test/support/lib/config.rb
index 4fe62d409..f6fdb4ecb 100644
--- a/Library/Homebrew/test/lib/config.rb
+++ b/Library/Homebrew/test/support/lib/config.rb
@@ -14,7 +14,7 @@ TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") do |k|
end
# Paths pointing into the Homebrew code base that persist across test runs
-HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../..", __FILE__))
+HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../../..", __FILE__))
HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY_PATH.parent+"Homebrew/shims"
HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":")
@@ -31,7 +31,7 @@ HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+"cellar"
HOMEBREW_LOGS = HOMEBREW_PREFIX.parent+"logs"
HOMEBREW_TEMP = HOMEBREW_PREFIX.parent+"temp"
-TEST_FIXTURE_DIR = HOMEBREW_LIBRARY_PATH.join("test", "fixtures")
+TEST_FIXTURE_DIR = HOMEBREW_LIBRARY_PATH.join("test", "support", "fixtures")
TESTBALL_SHA1 = "be478fd8a80fe7f29196d6400326ac91dad68c37".freeze
TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b".freeze
diff --git a/Library/Homebrew/test/test_switch.rb b/Library/Homebrew/test/switch_test.rb
index 88fdf85b9..af1926c39 100644
--- a/Library/Homebrew/test/test_switch.rb
+++ b/Library/Homebrew/test/switch_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestSwitch < IntegrationCommandTestCase
def test_switch
diff --git a/Library/Homebrew/test/test_tab.rb b/Library/Homebrew/test/tab_test.rb
index 2c756cf68..76c9aacc9 100644
--- a/Library/Homebrew/test/test_tab.rb
+++ b/Library/Homebrew/test/tab_test.rb
@@ -218,7 +218,7 @@ class TabLoadingTests < Homebrew::TestCase
@f = formula { url "foo-1.0" }
@f.prefix.mkpath
@path = @f.prefix.join(Tab::FILENAME)
- @path.write Pathname.new(TEST_DIRECTORY).join("fixtures", "receipt.json").read
+ @path.write TEST_FIXTURE_DIR.join("receipt.json").read
end
def teardown
diff --git a/Library/Homebrew/test/test_tap_new.rb b/Library/Homebrew/test/tap_new_test.rb
index 636024b0a..261a334f0 100644
--- a/Library/Homebrew/test/test_tap_new.rb
+++ b/Library/Homebrew/test/tap_new_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestTapNew < IntegrationCommandTestCase
def test_tap_readme
diff --git a/Library/Homebrew/test/test_tap.rb b/Library/Homebrew/test/tap_test.rb
index 71836aee9..b950cd166 100644
--- a/Library/Homebrew/test/test_tap.rb
+++ b/Library/Homebrew/test/tap_test.rb
@@ -1,5 +1,5 @@
require "testing_env"
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestTap < IntegrationCommandTestCase
def test_tap
diff --git a/Library/Homebrew/test/test_test_formula.rb b/Library/Homebrew/test/test_formula_test.rb
index b3889d6a2..5ad2db9e9 100644
--- a/Library/Homebrew/test/test_test_formula.rb
+++ b/Library/Homebrew/test/test_formula_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestTestFormula < IntegrationCommandTestCase
def test_test_formula
@@ -13,7 +13,7 @@ class IntegrationCommandTestTestFormula < IntegrationCommandTestCase
head "https://github.com/example/testball2.git"
devel do
- url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
sha256 "#{TESTBALL_SHA256}"
end
diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb
index 3fbf3e4b5..e2ba2e4e4 100644
--- a/Library/Homebrew/test/testing_env.rb
+++ b/Library/Homebrew/test/testing_env.rb
@@ -1,5 +1,5 @@
$:.unshift File.expand_path("../..", __FILE__)
-$:.unshift File.expand_path("../lib", __FILE__)
+$:.unshift File.expand_path("../support/lib", __FILE__)
require "simplecov" if ENV["HOMEBREW_TESTS_COVERAGE"]
require "global"
@@ -9,11 +9,7 @@ require "formulary"
(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-core/Formula").mkpath
%w[cache formula_cache locks cellar logs temp].each { |d| HOMEBREW_PREFIX.parent.join(d).mkpath }
-# Test fixtures and files can be found relative to this path
-TEST_DIRECTORY = File.dirname(File.expand_path(__FILE__))
-
begin
- require "rubygems"
require "minitest/autorun"
require "parallel_tests/test/runtime_logger"
require "mocha/setup"
@@ -21,106 +17,5 @@ rescue LoadError
abort "Run `bundle install` or install the mocha and minitest gems before running the tests"
end
-module Homebrew
- module VersionAssertions
- def version(v)
- Version.create(v)
- end
-
- def assert_version_equal(expected, actual)
- assert_equal Version.create(expected), actual
- end
-
- def assert_version_detected(expected, url, specs = {})
- assert_equal expected, Version.detect(url, specs).to_s
- end
-
- def assert_version_nil(url)
- assert Version.parse(url).null?
- end
- end
-
- module FSLeakLogger
- def self.included(klass)
- require "find"
- @@log = File.open("#{__dir__}/fs_leak_log", "w")
- klass.make_my_diffs_pretty!
- end
-
- def before_setup
- @__files_before_test = []
- Find.find(TEST_TMPDIR) { |f| @__files_before_test << f.sub(TEST_TMPDIR, "") }
- super
- end
-
- def after_teardown
- super
- files_after_test = []
- Find.find(TEST_TMPDIR) { |f| files_after_test << f.sub(TEST_TMPDIR, "") }
- return if @__files_before_test == files_after_test
- @@log.puts location, diff(@__files_before_test, files_after_test)
- end
- end
-
- class TestCase < ::Minitest::Test
- require "test/helper/env"
- require "test/helper/shutup"
- include Test::Helper::Env
- include Test::Helper::Shutup
-
- include VersionAssertions
- include FSLeakLogger
-
- TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze
- TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze
-
- def formula(name = "formula_name", path = Formulary.core_path(name), spec = :stable, alias_path: nil, &block)
- @_f = Class.new(Formula, &block).new(name, path, spec, alias_path: alias_path)
- end
-
- def mktmpdir(prefix_suffix = nil, &block)
- Dir.mktmpdir(prefix_suffix, HOMEBREW_TEMP, &block)
- end
-
- def needs_compat
- skip "Requires compat/ code" if ENV["HOMEBREW_NO_COMPAT"]
- end
-
- def needs_python
- skip "Requires Python" unless which("python")
- end
-
- def assert_nothing_raised
- yield
- end
-
- def assert_eql(exp, act, msg = nil)
- msg = message(msg, "") { diff exp, act }
- assert exp.eql?(act), msg
- end
-
- def refute_eql(exp, act, msg = nil)
- msg = message(msg) do
- "Expected #{mu_pp(act)} to not be eql to #{mu_pp(exp)}"
- end
- refute exp.eql?(act), msg
- end
-
- def dylib_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
- end
-
- def bundle_path(name)
- Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
- end
-
- # Use a stubbed {Formulary::FormulaLoader} to make a given formula be found
- # when loading from {Formulary} with `ref`.
- def stub_formula_loader(formula, ref = formula.full_name)
- loader = mock
- loader.stubs(:get_formula).returns(formula)
- Formulary.stubs(:loader_for).with(ref, from: :keg).returns(loader)
- Formulary.stubs(:loader_for).with(ref, from: nil).returns(loader)
- end
- end
-end
+require "test/support/helper/test_case"
+require "test/support/helper/integration_command_test_case"
diff --git a/Library/Homebrew/test/test_uninstall.rb b/Library/Homebrew/test/uninstall_test.rb
index d86db0e80..70a694353 100644
--- a/Library/Homebrew/test/test_uninstall.rb
+++ b/Library/Homebrew/test/uninstall_test.rb
@@ -1,4 +1,3 @@
-require "helper/integration_command_test_case"
require "cmd/uninstall"
class UninstallTests < Homebrew::TestCase
diff --git a/Library/Homebrew/test/test_unlink.rb b/Library/Homebrew/test/unlink_test.rb
index 091bd8c45..6d5cefc67 100644
--- a/Library/Homebrew/test/test_unlink.rb
+++ b/Library/Homebrew/test/unlink_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestUnlink < IntegrationCommandTestCase
def test_unlink
diff --git a/Library/Homebrew/test/test_unlinkapps.rb b/Library/Homebrew/test/unlinkapps_test.rb
index 2de4e3ff8..9d9672199 100644
--- a/Library/Homebrew/test/test_unlinkapps.rb
+++ b/Library/Homebrew/test/unlinkapps_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestUnlinkapps < IntegrationCommandTestCase
def test_unlinkapps
diff --git a/Library/Homebrew/test/test_unpack.rb b/Library/Homebrew/test/unpack_test.rb
index de1452a29..bbff6ad1c 100644
--- a/Library/Homebrew/test/test_unpack.rb
+++ b/Library/Homebrew/test/unpack_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestUnpack < IntegrationCommandTestCase
def test_unpack
diff --git a/Library/Homebrew/test/test_update_report.rb b/Library/Homebrew/test/update_report_test.rb
index 6b6cec6ce..6b6cec6ce 100644
--- a/Library/Homebrew/test/test_update_report.rb
+++ b/Library/Homebrew/test/update_report_test.rb
diff --git a/Library/Homebrew/test/test_upgrade.rb b/Library/Homebrew/test/upgrade_test.rb
index 73618293b..f3f5dccc7 100644
--- a/Library/Homebrew/test/test_upgrade.rb
+++ b/Library/Homebrew/test/upgrade_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestUpgrade < IntegrationCommandTestCase
def test_upgrade
diff --git a/Library/Homebrew/test/test_uses.rb b/Library/Homebrew/test/uses_test.rb
index b0e79ef2d..2b1555417 100644
--- a/Library/Homebrew/test/test_uses.rb
+++ b/Library/Homebrew/test/uses_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestUses < IntegrationCommandTestCase
def test_uses
diff --git a/Library/Homebrew/test/utils/tty_test.rb b/Library/Homebrew/test/utils/tty_test.rb
new file mode 100644
index 000000000..09f092cbd
--- /dev/null
+++ b/Library/Homebrew/test/utils/tty_test.rb
@@ -0,0 +1,46 @@
+require "testing_env"
+require "utils"
+
+class TtyTests < Homebrew::TestCase
+ def test_strip_ansi
+ assert_equal "hello", Tty.strip_ansi("\033\[36;7mhello\033\[0m")
+ end
+
+ def test_width
+ assert_kind_of Integer, Tty.width
+ end
+
+ def test_truncate
+ Tty.stubs(:width).returns 15
+ assert_equal "foobar some", Tty.truncate("foobar something very long")
+ assert_equal "truncate", Tty.truncate("truncate")
+
+ # When the terminal is unsupported, we report 0 width
+ Tty.stubs(:width).returns 0
+ assert_equal "foobar something very long", Tty.truncate("foobar something very long")
+ end
+
+ def test_no_tty_formatting
+ $stdout.stubs(:tty?).returns false
+ assert_equal "", Tty.to_s
+ assert_equal "", Tty.red.to_s
+ assert_equal "", Tty.green.to_s
+ assert_equal "", Tty.yellow.to_s
+ assert_equal "", Tty.blue.to_s
+ assert_equal "", Tty.magenta.to_s
+ assert_equal "", Tty.cyan.to_s
+ assert_equal "", Tty.default.to_s
+ end
+
+ def test_formatting
+ $stdout.stubs(:tty?).returns(true)
+ assert_equal "", Tty.to_s
+ assert_equal "\033[31m", Tty.red.to_s
+ assert_equal "\033[32m", Tty.green.to_s
+ assert_equal "\033[33m", Tty.yellow.to_s
+ assert_equal "\033[34m", Tty.blue.to_s
+ assert_equal "\033[35m", Tty.magenta.to_s
+ assert_equal "\033[36m", Tty.cyan.to_s
+ assert_equal "\033[39m", Tty.default.to_s
+ end
+end
diff --git a/Library/Homebrew/test/test_utils.rb b/Library/Homebrew/test/utils_test.rb
index 7c0b6f78a..146f57b49 100644
--- a/Library/Homebrew/test/test_utils.rb
+++ b/Library/Homebrew/test/utils_test.rb
@@ -3,50 +3,6 @@ require "utils"
require "tempfile"
require "utils/shell"
-class TtyTests < Homebrew::TestCase
- def test_strip_ansi
- assert_equal "hello", Tty.strip_ansi("\033\[36;7mhello\033\[0m")
- end
-
- def test_width
- assert_kind_of Integer, Tty.width
- end
-
- def test_truncate
- Tty.stubs(:width).returns 15
- assert_equal "foobar some", Tty.truncate("foobar something very long")
- assert_equal "truncate", Tty.truncate("truncate")
-
- # When the terminal is unsupported, we report 0 width
- Tty.stubs(:width).returns 0
- assert_equal "foobar something very long", Tty.truncate("foobar something very long")
- end
-
- def test_no_tty_formatting
- $stdout.stubs(:tty?).returns false
- assert_equal "", Tty.to_s
- assert_equal "", Tty.red.to_s
- assert_equal "", Tty.green.to_s
- assert_equal "", Tty.yellow.to_s
- assert_equal "", Tty.blue.to_s
- assert_equal "", Tty.magenta.to_s
- assert_equal "", Tty.cyan.to_s
- assert_equal "", Tty.default.to_s
- end
-
- def test_formatting
- $stdout.stubs(:tty?).returns(true)
- assert_equal "", Tty.to_s
- assert_equal "\033[31m", Tty.red.to_s
- assert_equal "\033[32m", Tty.green.to_s
- assert_equal "\033[33m", Tty.yellow.to_s
- assert_equal "\033[34m", Tty.blue.to_s
- assert_equal "\033[35m", Tty.magenta.to_s
- assert_equal "\033[36m", Tty.cyan.to_s
- assert_equal "\033[39m", Tty.default.to_s
- end
-end
-
class UtilTests < Homebrew::TestCase
def setup
@dir = Pathname.new(mktmpdir)
diff --git a/Library/Homebrew/test/test_version.rb b/Library/Homebrew/test/version_test.rb
index ca37e3567..e7ffbc4f6 100644
--- a/Library/Homebrew/test/test_version.rb
+++ b/Library/Homebrew/test/version_test.rb
@@ -1,4 +1,4 @@
-require "helper/integration_command_test_case"
+require "testing_env"
class IntegrationCommandTestVersion < IntegrationCommandTestCase
def test_version
diff --git a/Library/Homebrew/test/test_versions.rb b/Library/Homebrew/test/versions_test.rb
index a6e922178..a6e922178 100644
--- a/Library/Homebrew/test/test_versions.rb
+++ b/Library/Homebrew/test/versions_test.rb
diff --git a/Library/Homebrew/test/test_x11_requirement.rb b/Library/Homebrew/test/x11_requirement_test.rb
index b82a59e53..b82a59e53 100644
--- a/Library/Homebrew/test/test_x11_requirement.rb
+++ b/Library/Homebrew/test/x11_requirement_test.rb