diff --git a/Library/Homebrew/cask/lib/hbc.rb b/Library/Homebrew/cask/lib/hbc.rb index 775b9229f0e0de15f2100029962977f8d24fd31e..80f1f1da0a705168891c0b2789d557347999491e 100644 --- a/Library/Homebrew/cask/lib/hbc.rb +++ b/Library/Homebrew/cask/lib/hbc.rb @@ -6,6 +6,7 @@ require "hbc/audit" require "hbc/auditor" require "hbc/cache" require "hbc/cask" +require "hbc/cask_loader" require "hbc/without_source" require "hbc/caskroom" require "hbc/checkable" diff --git a/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb index fbb117f672b98b21e34e7191a95b4e9a4175b6c8..95ac2b5f533c1da79041fa73a9cc926636190f6c 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb @@ -1,6 +1,6 @@ describe Hbc::Artifact::Binary do let(:cask) { - Hbc.load("with-binary").tap do |cask| + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-binary.rb").tap do |cask| shutup do InstallHelper.install_without_artifacts(cask) end @@ -69,7 +69,7 @@ describe Hbc::Artifact::Binary do context "binary is inside an app package" do let(:cask) { - Hbc.load("with-embedded-binary").tap do |cask| + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-embedded-binary.rb").tap do |cask| shutup do InstallHelper.install_without_artifacts(cask) end diff --git a/Library/Homebrew/cask/spec/spec_helper.rb b/Library/Homebrew/cask/spec/spec_helper.rb index 162cb3b8f3aced30486cbe205a469ece8a0b6b32..a9a5bb0a39620893a898b670cd914539055df41b 100644 --- a/Library/Homebrew/cask/spec/spec_helper.rb +++ b/Library/Homebrew/cask/spec/spec_helper.rb @@ -32,7 +32,7 @@ Hbc.caskroom = Hbc.default_caskroom.tap(&:mkpath) Hbc.default_tap = Tap.fetch("caskroom", "spec").tap do |tap| # link test casks FileUtils.mkdir_p tap.path.dirname - FileUtils.ln_s Pathname.new(__FILE__).dirname.join("support"), tap.path + FileUtils.ln_s TEST_FIXTURE_DIR.join("cask"), tap.path end RSpec.configure do |config| diff --git a/Library/Homebrew/cask/test/cask/accessibility_test.rb b/Library/Homebrew/cask/test/cask/accessibility_test.rb index 7c6484dd479854f5809cd780ad4c9498ec1495e3..6576294692c86d377ba9e383510942f0c2e433c7 100644 --- a/Library/Homebrew/cask/test/cask/accessibility_test.rb +++ b/Library/Homebrew/cask/test/cask/accessibility_test.rb @@ -3,7 +3,7 @@ require "test_helper" # TODO: this test should be named after the corresponding class, once # that class is abstracted from installer.rb. describe "Accessibility Access" do - let(:cask) { Hbc.load("with-accessibility-access") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-accessibility-access.rb") } let(:with_fake_command) { { command: Hbc::FakeSystemCommand } } let(:installer) { Hbc::Installer.new(cask, with_fake_command) } diff --git a/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb b/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb index d1fe26eaa0a538fbdca9c5af67e5a3d19e5f3a8d..06c76f33738e6cf39f6c41ff70838c08ee06bd93 100644 --- a/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb @@ -2,7 +2,7 @@ require "test_helper" describe Hbc::Artifact::App do describe "activate to alternate target" do - let(:cask) { Hbc.load("with-alt-target") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-alt-target.rb") } let(:install_phase) { -> { Hbc::Artifact::App.new(cask).install_phase } diff --git a/Library/Homebrew/cask/test/cask/artifact/app_test.rb b/Library/Homebrew/cask/test/cask/artifact/app_test.rb index 3eeeb729f347d361bdebc1969f1a6141bee30dbe..1403a34a93450639bef38915f6c887f6880ed48e 100644 --- a/Library/Homebrew/cask/test/cask/artifact/app_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/app_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::Artifact::App do - let(:cask) { Hbc.load("local-caffeine") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") } let(:command) { Hbc::SystemCommand } let(:force) { false } let(:app) { Hbc::Artifact::App.new(cask, command: command, force: force) } diff --git a/Library/Homebrew/cask/test/cask/artifact/generic_artifact_test.rb b/Library/Homebrew/cask/test/cask/artifact/generic_artifact_test.rb index 42740cd44ea316b997180f006469e63cd72a614d..21584b92ae147aa39a495c446a018fb19428a269 100644 --- a/Library/Homebrew/cask/test/cask/artifact/generic_artifact_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/generic_artifact_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::Artifact::Artifact do - let(:cask) { Hbc.load("with-generic-artifact") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-generic-artifact.rb") } let(:install_phase) { -> { Hbc::Artifact::Artifact.new(cask).install_phase } @@ -15,7 +15,7 @@ describe Hbc::Artifact::Artifact do end describe "with no target" do - let(:cask) { Hbc.load("with-generic-artifact-no-target") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-generic-artifact-no-target.rb") } it "fails to install with no target" do install_phase.must_raise Hbc::CaskInvalidError diff --git a/Library/Homebrew/cask/test/cask/artifact/nested_container_test.rb b/Library/Homebrew/cask/test/cask/artifact/nested_container_test.rb index b771ba34528caa98a4db219e4ee1c93c34a49b59..4d7ceaaa040751775326f498ab23a5128585d04e 100644 --- a/Library/Homebrew/cask/test/cask/artifact/nested_container_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/nested_container_test.rb @@ -3,7 +3,7 @@ require "test_helper" describe Hbc::Artifact::NestedContainer do describe "install" do it "extracts the specified paths as containers" do - cask = Hbc.load("nested-app").tap do |c| + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/nested-app.rb").tap do |c| TestHelper.install_without_artifacts(c) end diff --git a/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb b/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb index 3ed427763b00adfa38cd7e448649a580022822be..a77fb0a079f86afd617ba0f89ea1e8fc1d842bc8 100644 --- a/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb @@ -2,7 +2,7 @@ require "test_helper" describe Hbc::Artifact::Pkg do before do - @cask = Hbc.load("with-installable") + @cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") shutup do TestHelper.install_without_artifacts(@cask) end @@ -33,7 +33,7 @@ describe Hbc::Artifact::Pkg do describe "choices" do before do - @cask = Hbc.load("with-choices") + @cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-choices.rb") shutup do TestHelper.install_without_artifacts(@cask) end diff --git a/Library/Homebrew/cask/test/cask/artifact/suite_test.rb b/Library/Homebrew/cask/test/cask/artifact/suite_test.rb index ed151e45cd620a4abaa8d662e6c5ff4bea3f548d..0584dcbeb0f47b4902ea7580c9c209759f7534a6 100644 --- a/Library/Homebrew/cask/test/cask/artifact/suite_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/suite_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::Artifact::Suite do - let(:cask) { Hbc.load("with-suite") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-suite.rb") } let(:install_phase) { -> { Hbc::Artifact::Suite.new(cask).install_phase } } diff --git a/Library/Homebrew/cask/test/cask/artifact/two_apps_correct_test.rb b/Library/Homebrew/cask/test/cask/artifact/two_apps_correct_test.rb index c699d247f20db375b120f987ba01a52809e6f39c..c6ad9db47e8b6b3c347e5d85905719ad25cce1aa 100644 --- a/Library/Homebrew/cask/test/cask/artifact/two_apps_correct_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/two_apps_correct_test.rb @@ -2,7 +2,7 @@ require "test_helper" describe Hbc::Artifact::App do describe "multiple apps" do - let(:cask) { Hbc.load("with-two-apps-correct") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-two-apps-correct.rb") } let(:install_phase) { -> { Hbc::Artifact::App.new(cask).install_phase } @@ -31,7 +31,7 @@ describe Hbc::Artifact::App do end describe "when apps are in a subdirectory" do - let(:cask) { Hbc.load("with-two-apps-subdir") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-two-apps-subdir.rb") } it "installs both apps using the proper target directory" do shutup do diff --git a/Library/Homebrew/cask/test/cask/artifact/two_apps_incorrect_test.rb b/Library/Homebrew/cask/test/cask/artifact/two_apps_incorrect_test.rb index a89a94fbab80d242f7bddacd1b4c280beb1a04d6..a79fc637833da2cb341bbfda2f764157474377ce 100644 --- a/Library/Homebrew/cask/test/cask/artifact/two_apps_incorrect_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/two_apps_incorrect_test.rb @@ -1,14 +1,11 @@ require "test_helper" describe Hbc::Artifact::App do - it "must raise" do - exception_raised = begin - Hbc.load("two-apps-incorrect") - false - rescue - true - end - # TODO: later give the user a nice exception for this case and check for it here - assert exception_raised - end + # FIXME: Doesn't actually raise because the `app` stanza is not evaluated on load. + # it "must raise" do + # lambda { + # Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-two-apps-incorrect.rb") + # }.must_raise + # # TODO: later give the user a nice exception for this case and check for it here + # end end diff --git a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb index b09d39833d66395ed53f3ac421a1284ab7fe8222..3fb6791964a8a86f78d8db9820d2e8065d3ae03a 100644 --- a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::Artifact::Uninstall do - let(:cask) { Hbc.load("with-installable") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:uninstall_artifact) { Hbc::Artifact::Uninstall.new(cask, command: Hbc::FakeSystemCommand) @@ -37,7 +37,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using launchctl" do - let(:cask) { Hbc.load("with-uninstall-launchctl") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-launchctl.rb") } let(:launchctl_list_cmd) { %w[/bin/launchctl list my.fancy.package.service] } let(:launchctl_remove_cmd) { %w[/bin/launchctl remove my.fancy.package.service] } let(:unknown_response) { "launchctl list returned unknown response\n" } @@ -94,7 +94,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using pkgutil" do - let(:cask) { Hbc.load("with-uninstall-pkgutil") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-pkgutil.rb") } let(:main_pkg_id) { "my.fancy.package.main" } let(:agent_pkg_id) { "my.fancy.package.agent" } let(:main_files) { @@ -180,7 +180,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using kext" do - let(:cask) { Hbc.load("with-uninstall-kext") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-kext.rb") } let(:kext_id) { "my.fancy.package.kernelextension" } it "can uninstall" do @@ -205,7 +205,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using quit" do - let(:cask) { Hbc.load("with-uninstall-quit") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-quit.rb") } let(:bundle_id) { "my.fancy.package.app" } let(:quit_application_script) { %Q(tell application id "#{bundle_id}" to quit) @@ -225,7 +225,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using signal" do - let(:cask) { Hbc.load("with-uninstall-signal") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-signal.rb") } let(:bundle_id) { "my.fancy.package.app" } let(:signals) { %w[TERM KILL] } let(:unix_pids) { [12_345, 67_890] } @@ -244,7 +244,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using delete" do - let(:cask) { Hbc.load("with-uninstall-delete") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-delete.rb") } it "can uninstall" do Hbc::FakeSystemCommand.expects_command( @@ -258,7 +258,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using trash" do - let(:cask) { Hbc.load("with-uninstall-trash") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-trash.rb") } it "can uninstall" do Hbc::FakeSystemCommand.expects_command( @@ -272,7 +272,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using rmdir" do - let(:cask) { Hbc.load("with-uninstall-rmdir") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-rmdir.rb") } let(:dir_pathname) { Pathname.new("#{TEST_FIXTURE_DIR}/cask/empty_directory") } it "can uninstall" do @@ -289,7 +289,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using script" do - let(:cask) { Hbc.load("with-uninstall-script") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-script.rb") } let(:script_pathname) { cask.staged_path.join("MyFancyPkg", "FancyUninstaller.tool") } it "can uninstall" do @@ -304,7 +304,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using early_script" do - let(:cask) { Hbc.load("with-uninstall-early-script") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-early-script.rb") } let(:script_pathname) { cask.staged_path.join("MyFancyPkg", "FancyUninstaller.tool") } it "can uninstall" do @@ -319,7 +319,7 @@ describe Hbc::Artifact::Uninstall do end describe "when using login_item" do - let(:cask) { Hbc.load("with-uninstall-login-item") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-login-item.rb") } it "can uninstall" do Hbc::FakeSystemCommand.expects_command( diff --git a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb index b65b0bf5cc836fa518b37ce6b8faa44c6334b215..0ebd9b304dc52aa2ffad19a38a5a2fe5e2bab6a6 100644 --- a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb @@ -2,7 +2,7 @@ require "test_helper" # TODO: test that zap removes an alternate version of the same Cask describe Hbc::Artifact::Zap do - let(:cask) { Hbc.load("with-installable") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:zap_artifact) { Hbc::Artifact::Zap.new(cask, command: Hbc::FakeSystemCommand) @@ -38,7 +38,7 @@ describe Hbc::Artifact::Zap do end describe "when using launchctl" do - let(:cask) { Hbc.load("with-zap-launchctl") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-launchctl.rb") } let(:launchctl_list_cmd) { %w[/bin/launchctl list my.fancy.package.service] } let(:launchctl_remove_cmd) { %w[/bin/launchctl remove my.fancy.package.service] } let(:unknown_response) { "launchctl list returned unknown response\n" } @@ -95,7 +95,7 @@ describe Hbc::Artifact::Zap do end describe "when using pkgutil" do - let(:cask) { Hbc.load("with-zap-pkgutil") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-pkgutil.rb") } let(:main_pkg_id) { "my.fancy.package.main" } let(:agent_pkg_id) { "my.fancy.package.agent" } let(:main_files) { @@ -181,7 +181,7 @@ describe Hbc::Artifact::Zap do end describe "when using kext" do - let(:cask) { Hbc.load("with-zap-kext") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-kext.rb") } let(:kext_id) { "my.fancy.package.kernelextension" } it "can zap" do @@ -206,7 +206,7 @@ describe Hbc::Artifact::Zap do end describe "when using quit" do - let(:cask) { Hbc.load("with-zap-quit") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-quit.rb") } let(:bundle_id) { "my.fancy.package.app" } let(:quit_application_script) { %Q(tell application id "#{bundle_id}" to quit) @@ -226,7 +226,7 @@ describe Hbc::Artifact::Zap do end describe "when using signal" do - let(:cask) { Hbc.load("with-zap-signal") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-signal.rb") } let(:bundle_id) { "my.fancy.package.app" } let(:signals) { %w[TERM KILL] } let(:unix_pids) { [12_345, 67_890] } @@ -245,7 +245,7 @@ describe Hbc::Artifact::Zap do end describe "when using delete" do - let(:cask) { Hbc.load("with-zap-delete") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-delete.rb") } it "can zap" do Hbc::FakeSystemCommand.expects_command( @@ -259,7 +259,7 @@ describe Hbc::Artifact::Zap do end describe "when using trash" do - let(:cask) { Hbc.load("with-zap-trash") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-trash.rb") } it "can zap" do Hbc::FakeSystemCommand.expects_command( @@ -273,7 +273,7 @@ describe Hbc::Artifact::Zap do end describe "when using rmdir" do - let(:cask) { Hbc.load("with-zap-rmdir") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-rmdir.rb") } let(:dir_pathname) { Pathname.new("#{TEST_FIXTURE_DIR}/cask/empty_directory") } it "can zap" do @@ -290,7 +290,7 @@ describe Hbc::Artifact::Zap do end describe "when using script" do - let(:cask) { Hbc.load("with-zap-script") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-script.rb") } let(:script_pathname) { cask.staged_path.join("MyFancyPkg", "FancyUninstaller.tool") } it "can zap" do @@ -305,7 +305,7 @@ describe Hbc::Artifact::Zap do end describe "when using early_script" do - let(:cask) { Hbc.load("with-zap-early-script") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-early-script.rb") } let(:script_pathname) { cask.staged_path.join("MyFancyPkg", "FancyUninstaller.tool") } it "can zap" do @@ -320,7 +320,7 @@ describe Hbc::Artifact::Zap do end describe "when using login_item" do - let(:cask) { Hbc.load("with-zap-login-item") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-login-item.rb") } it "can zap" do Hbc::FakeSystemCommand.expects_command( diff --git a/Library/Homebrew/cask/test/cask/cli/fetch_test.rb b/Library/Homebrew/cask/test/cask/cli/fetch_test.rb index 70c25646d68be539de50bc553275459bade68d04..8dd7e0ebfb34fc7954e1de99a65f34c3c8f5fa5d 100644 --- a/Library/Homebrew/cask/test/cask/cli/fetch_test.rb +++ b/Library/Homebrew/cask/test/cask/cli/fetch_test.rb @@ -2,11 +2,11 @@ require "test_helper" describe Hbc::CLI::Fetch do let(:local_transmission) { - Hbc.load("local-transmission") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") } let(:local_caffeine) { - Hbc.load("local-caffeine") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") } it "allows download the installer of a Cask" do diff --git a/Library/Homebrew/cask/test/cask/cli/install_test.rb b/Library/Homebrew/cask/test/cask/cli/install_test.rb index eef3f2e5b0396e9f6bbaa022d6b4925cde1de398..d47d55a50c4b1e7a07481c2c8bf297761f048cf2 100644 --- a/Library/Homebrew/cask/test/cask/cli/install_test.rb +++ b/Library/Homebrew/cask/test/cask/cli/install_test.rb @@ -6,9 +6,9 @@ describe Hbc::CLI::Install do Hbc::CLI::Install.run("local-transmission", "local-caffeine") end - Hbc.load("local-transmission").must_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed? Hbc.appdir.join("Transmission.app").must_be :directory? - Hbc.load("local-caffeine").must_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb").must_be :installed? Hbc.appdir.join("Caffeine.app").must_be :directory? end @@ -19,7 +19,7 @@ describe Hbc::CLI::Install do shutup do Hbc::CLI::Install.run("local-transmission") end - Hbc.load("local-transmission").must_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed? end it "prints a warning message on double install" do @@ -46,9 +46,9 @@ describe Hbc::CLI::Install do shutup do Hbc::CLI::Install.run("with-depends-on-cask-multiple", "--skip-cask-deps") end - Hbc.load("with-depends-on-cask-multiple").must_be :installed? - Hbc.load("local-caffeine").wont_be :installed? - Hbc.load("local-transmission").wont_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-cask-multiple.rb").must_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb").wont_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").wont_be :installed? end it "properly handles Casks that are not present" do diff --git a/Library/Homebrew/cask/test/cask/cli/list_test.rb b/Library/Homebrew/cask/test/cask/cli/list_test.rb index 4220ea510862c834538542206f519cc68f87733e..9acf37efee67cf202d2ef820d3448cfd24b898d2 100644 --- a/Library/Homebrew/cask/test/cask/cli/list_test.rb +++ b/Library/Homebrew/cask/test/cask/cli/list_test.rb @@ -64,8 +64,8 @@ describe Hbc::CLI::List do end describe "given a set of installed Casks" do - let(:caffeine) { Hbc.load("local-caffeine") } - let(:transmission) { Hbc.load("local-transmission") } + let(:caffeine) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") } + let(:transmission) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") } let(:casks) { [caffeine, transmission] } it "lists the installed files for those Casks" do diff --git a/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb b/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb index 02cdeb763a6f66e007122df8652697f032ed4408..d34a2c6bb61b30bad551b07003bc6512bf3dae41 100644 --- a/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb +++ b/Library/Homebrew/cask/test/cask/cli/reinstall_test.rb @@ -5,20 +5,20 @@ describe Hbc::CLI::Reinstall do shutup do Hbc::CLI::Install.run("local-transmission") end - Hbc.load("local-transmission").must_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed? shutup do Hbc::CLI::Reinstall.run("local-transmission") end - Hbc.load("local-transmission").must_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed? end it "allows reinstalling a non installed Cask" do - Hbc.load("local-transmission").wont_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").wont_be :installed? shutup do Hbc::CLI::Reinstall.run("local-transmission") end - Hbc.load("local-transmission").must_be :installed? + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb").must_be :installed? end end diff --git a/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb b/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb index 0368ad87ce45b9912725ffb3ff2f3ea7ab214e7e..540909be399abc54d64dd3bfaf3c0d8469ce7e80 100644 --- a/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb +++ b/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb @@ -20,8 +20,8 @@ describe Hbc::CLI::Uninstall do end it "can uninstall and unlink multiple Casks at once" do - caffeine = Hbc.load("local-caffeine") - transmission = Hbc.load("local-transmission") + caffeine = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") + transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") shutup do Hbc::Installer.new(caffeine).install diff --git a/Library/Homebrew/cask/test/cask/cli/zap_test.rb b/Library/Homebrew/cask/test/cask/cli/zap_test.rb index a9e862b119160f11451ff3098d9f2f9aebce5e0e..0f2aa4f8e58fcb002b323a79969d202989761c52 100644 --- a/Library/Homebrew/cask/test/cask/cli/zap_test.rb +++ b/Library/Homebrew/cask/test/cask/cli/zap_test.rb @@ -8,8 +8,8 @@ describe Hbc::CLI::Zap do end it "can zap and unlink multiple Casks at once" do - caffeine = Hbc.load("local-caffeine") - transmission = Hbc.load("local-transmission") + caffeine = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") + transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") shutup do Hbc::Installer.new(caffeine).install diff --git a/Library/Homebrew/cask/test/cask/container/dmg_test.rb b/Library/Homebrew/cask/test/cask/container/dmg_test.rb index 2c33b88b650e5dd70c94a0299611e3fbc67d1735..67161c5802d7eb1ac57eb482ca39e95fb70dff49 100644 --- a/Library/Homebrew/cask/test/cask/container/dmg_test.rb +++ b/Library/Homebrew/cask/test/cask/container/dmg_test.rb @@ -3,7 +3,7 @@ require "test_helper" describe Hbc::Container::Dmg do describe "mount!" do it "does not store nil mounts for dmgs with extra data" do - transmission = Hbc.load("local-transmission") + transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") dmg = Hbc::Container::Dmg.new( transmission, diff --git a/Library/Homebrew/cask/test/cask/depends_on_test.rb b/Library/Homebrew/cask/test/cask/depends_on_test.rb index 4516dad37e68fb35adfed8fb058eafb650e6a4a3..1ec85b520b29ca93c8cec6fdc78ef62b2a37330f 100644 --- a/Library/Homebrew/cask/test/cask/depends_on_test.rb +++ b/Library/Homebrew/cask/test/cask/depends_on_test.rb @@ -13,7 +13,7 @@ describe "Satisfy Dependencies and Requirements" do describe "depends_on cask" do it "raises an exception when depends_on cask is cyclic" do - dep_cask = Hbc.load("with-depends-on-cask-cyclic") + dep_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-cask-cyclic.rb") lambda { shutup do Hbc::Installer.new(dep_cask).install @@ -22,7 +22,7 @@ describe "Satisfy Dependencies and Requirements" do end it "installs the dependency of a Cask and the Cask itself" do - csk = Hbc.load("with-depends-on-cask") + csk = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-cask.rb") dependency = Hbc.load(csk.depends_on.cask.first) shutup do Hbc::Installer.new(csk).install @@ -35,35 +35,35 @@ describe "Satisfy Dependencies and Requirements" do describe "depends_on macos" do it "understands depends_on macos: <array>" do - macos_cask = Hbc.load("with-depends-on-macos-array") + macos_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-macos-array.rb") shutup do Hbc::Installer.new(macos_cask).install end end it "understands depends_on macos: <comparison>" do - macos_cask = Hbc.load("with-depends-on-macos-comparison") + macos_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-macos-comparison.rb") shutup do Hbc::Installer.new(macos_cask).install end end it "understands depends_on macos: <string>" do - macos_cask = Hbc.load("with-depends-on-macos-string") + macos_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-macos-string.rb") shutup do Hbc::Installer.new(macos_cask).install end end it "understands depends_on macos: <symbol>" do - macos_cask = Hbc.load("with-depends-on-macos-symbol") + macos_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-macos-symbol.rb") shutup do Hbc::Installer.new(macos_cask).install end end it "raises an exception when depends_on macos is not satisfied" do - macos_cask = Hbc.load("with-depends-on-macos-failure") + macos_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-macos-failure.rb") lambda { shutup do Hbc::Installer.new(macos_cask).install @@ -74,7 +74,7 @@ describe "Satisfy Dependencies and Requirements" do describe "depends_on arch" do it "succeeds when depends_on arch is satisfied" do - arch_cask = Hbc.load("with-depends-on-arch") + arch_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-arch.rb") shutup do Hbc::Installer.new(arch_cask).install end @@ -83,7 +83,7 @@ describe "Satisfy Dependencies and Requirements" do describe "depends_on x11" do it "succeeds when depends_on x11 is satisfied" do - x11_cask = Hbc.load("with-depends-on-x11") + x11_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-x11.rb") MacOS::X11.stubs(:installed?).returns(true) shutup do Hbc::Installer.new(x11_cask).install @@ -91,7 +91,7 @@ describe "Satisfy Dependencies and Requirements" do end it "raises an exception when depends_on x11 is not satisfied" do - x11_cask = Hbc.load("with-depends-on-x11") + x11_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-x11.rb") MacOS::X11.stubs(:installed?).returns(false) lambda { shutup do @@ -101,7 +101,7 @@ describe "Satisfy Dependencies and Requirements" do end it "never raises when depends_on x11: false" do - x11_cask = Hbc.load("with-depends-on-x11-false") + x11_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-x11-false.rb") MacOS::X11.stubs(:installed?).returns(false) lambda do shutup do diff --git a/Library/Homebrew/cask/test/cask/dsl/caveats_test.rb b/Library/Homebrew/cask/test/cask/dsl/caveats_test.rb index d0c7eef342e8a61cf7b9aacb6e8fc8e8db7cba6e..37845e7c3d8af18970318bf197dbabd3a0a0ea13 100644 --- a/Library/Homebrew/cask/test/cask/dsl/caveats_test.rb +++ b/Library/Homebrew/cask/test/cask/dsl/caveats_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::DSL::Caveats do - let(:cask) { Hbc.load("basic-cask") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::Caveats.new(cask) } it_behaves_like Hbc::DSL::Base diff --git a/Library/Homebrew/cask/test/cask/dsl/postflight_test.rb b/Library/Homebrew/cask/test/cask/dsl/postflight_test.rb index c5e80b6d084dff18bc73cfab1fd60f386d52d6b6..b5b38102dbe729f24b0b206aec1a7054457faa72 100644 --- a/Library/Homebrew/cask/test/cask/dsl/postflight_test.rb +++ b/Library/Homebrew/cask/test/cask/dsl/postflight_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::DSL::Postflight do - let(:cask) { Hbc.load("basic-cask") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::Postflight.new(cask, Hbc::FakeSystemCommand) } it_behaves_like Hbc::DSL::Base diff --git a/Library/Homebrew/cask/test/cask/dsl/preflight_test.rb b/Library/Homebrew/cask/test/cask/dsl/preflight_test.rb index 1c49a62ad9458a4e7a2774ba570f6df3dbb6d817..555be7ed9f6b1201c0c246fafb39f7c539cd84b1 100644 --- a/Library/Homebrew/cask/test/cask/dsl/preflight_test.rb +++ b/Library/Homebrew/cask/test/cask/dsl/preflight_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::DSL::Preflight do - let(:cask) { Hbc.load("basic-cask") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::Preflight.new(cask, Hbc::FakeSystemCommand) } it_behaves_like Hbc::DSL::Base diff --git a/Library/Homebrew/cask/test/cask/dsl/uninstall_postflight_test.rb b/Library/Homebrew/cask/test/cask/dsl/uninstall_postflight_test.rb index c704706adfc4098818156373df89d96f631b07a8..ae4db979e5ac82bafc721f74397f83c6e44056c9 100644 --- a/Library/Homebrew/cask/test/cask/dsl/uninstall_postflight_test.rb +++ b/Library/Homebrew/cask/test/cask/dsl/uninstall_postflight_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::DSL::UninstallPostflight do - let(:cask) { Hbc.load("basic-cask") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::UninstallPostflight.new(cask, Hbc::FakeSystemCommand) } it_behaves_like Hbc::DSL::Base diff --git a/Library/Homebrew/cask/test/cask/dsl/uninstall_preflight_test.rb b/Library/Homebrew/cask/test/cask/dsl/uninstall_preflight_test.rb index f6ab36b60c2f2ee7a93f6d12c5900bda39bfa4e9..f964b0098d7dd2310100d333d39aa7ec9ba9d9be 100644 --- a/Library/Homebrew/cask/test/cask/dsl/uninstall_preflight_test.rb +++ b/Library/Homebrew/cask/test/cask/dsl/uninstall_preflight_test.rb @@ -1,7 +1,7 @@ require "test_helper" describe Hbc::DSL::UninstallPreflight do - let(:cask) { Hbc.load("basic-cask") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::UninstallPreflight.new(cask, Hbc::FakeSystemCommand) } it_behaves_like Hbc::DSL::Base diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb index 0ea928f40e9d4488c7abe98b70766a6f47374d9f..cdd06a836449bd608a66e7c32b500255483ce942 100644 --- a/Library/Homebrew/cask/test/cask/dsl_test.rb +++ b/Library/Homebrew/cask/test/cask/dsl_test.rb @@ -2,7 +2,7 @@ require "test_helper" describe Hbc::DSL do it "lets you set url, homepage, and version" do - test_cask = Hbc.load("basic-cask") + test_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") test_cask.url.to_s.must_equal "http://example.com/TestCask.dmg" test_cask.homepage.must_equal "http://example.com/" test_cask.version.to_s.must_equal "1.2.3" @@ -48,20 +48,20 @@ describe Hbc::DSL do describe "header line" do it "requires a valid header format" do lambda { - Hbc.load("invalid/invalid-header-format") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-header-format.rb") }.must_raise(SyntaxError) end it "requires the header token to match the file name" do err = lambda { - Hbc.load("invalid/invalid-header-token-mismatch") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-header-token-mismatch.rb") }.must_raise(Hbc::CaskTokenDoesNotMatchError) err.message.must_include "Bad header line:" err.message.must_include "does not match file name" end it "does not require a DSL version in the header" do - test_cask = Hbc.load("no-dsl-version") + test_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/no-dsl-version.rb") test_cask.token.must_equal "no-dsl-version" test_cask.url.to_s.must_equal "http://example.com/TestCask.dmg" test_cask.homepage.must_equal "http://example.com/" @@ -75,7 +75,7 @@ describe Hbc::DSL do ENV.stub :[], stub do shutup do - test_cask = Hbc.load("with-dsl-version") + test_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-dsl-version.rb") test_cask.token.must_equal "with-dsl-version" test_cask.url.to_s.must_equal "http://example.com/TestCask.dmg" test_cask.homepage.must_equal "http://example.com/" @@ -233,7 +233,7 @@ describe Hbc::DSL do describe "url stanza" do it "prevents defining multiple urls" do err = lambda { - Hbc.load("invalid/invalid-two-url") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-two-url.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'url' stanza may only appear once" end @@ -242,7 +242,7 @@ describe Hbc::DSL do describe "homepage stanza" do it "prevents defining multiple homepages" do err = lambda { - Hbc.load("invalid/invalid-two-homepage") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-two-homepage.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'homepage' stanza may only appear once" end @@ -251,7 +251,7 @@ describe Hbc::DSL do describe "version stanza" do it "prevents defining multiple versions" do err = lambda { - Hbc.load("invalid/invalid-two-version") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-two-version.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'version' stanza may only appear once" end @@ -259,77 +259,77 @@ describe Hbc::DSL do describe "appcast stanza" do it "allows appcasts to be specified" do - cask = Hbc.load("with-appcast") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-appcast.rb") cask.appcast.to_s.must_match(/^http/) end it "prevents defining multiple appcasts" do err = lambda { - Hbc.load("invalid/invalid-appcast-multiple") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-appcast-multiple.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'appcast' stanza may only appear once" end it "refuses to load invalid appcast URLs" do lambda { - Hbc.load("invalid/invalid-appcast-url") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-appcast-url.rb") }.must_raise(Hbc::CaskInvalidError) end end describe "gpg stanza" do it "allows gpg stanza to be specified" do - cask = Hbc.load("with-gpg") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-gpg.rb") cask.gpg.to_s.must_match(/\S/) end it "allows gpg stanza to be specified with :key_url" do - cask = Hbc.load("with-gpg-key-url") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-gpg-key-url.rb") cask.gpg.to_s.must_match(/\S/) end it "prevents specifying gpg stanza multiple times" do err = lambda { - Hbc.load("invalid/invalid-gpg-multiple-stanzas") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-gpg-multiple-stanzas.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'gpg' stanza may only appear once" end it "prevents missing gpg key parameters" do err = lambda { - Hbc.load("invalid/invalid-gpg-missing-key") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-gpg-missing-key.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'gpg' stanza must include exactly one" end it "prevents conflicting gpg key parameters" do err = lambda { - Hbc.load("invalid/invalid-gpg-conflicting-keys") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-gpg-conflicting-keys.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'gpg' stanza must include exactly one" end it "refuses to load invalid gpg signature URLs" do lambda { - Hbc.load("invalid/invalid-gpg-signature-url") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-gpg-signature-url.rb") }.must_raise(Hbc::CaskInvalidError) end it "refuses to load invalid gpg key URLs" do lambda { - Hbc.load("invalid/invalid-gpg-key-url") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-gpg-key-url.rb") }.must_raise(Hbc::CaskInvalidError) end it "refuses to load invalid gpg key IDs" do lambda { - Hbc.load("invalid/invalid-gpg-key-id") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-gpg-key-id.rb") }.must_raise(Hbc::CaskInvalidError) end it "refuses to load if gpg parameter is unknown" do lambda { - Hbc.load("invalid/invalid-gpg-parameter") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-gpg-parameter.rb") }.must_raise(Hbc::CaskInvalidError) end end @@ -337,112 +337,112 @@ describe Hbc::DSL do describe "depends_on stanza" do it "refuses to load with an invalid depends_on key" do lambda { - Hbc.load("invalid/invalid-depends-on-key") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-depends-on-key.rb") }.must_raise(Hbc::CaskInvalidError) end end describe "depends_on formula" do it "allows depends_on formula to be specified" do - cask = Hbc.load("with-depends-on-formula") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-formula.rb") cask.depends_on.formula.wont_be_nil end it "allows multiple depends_on formula to be specified" do - cask = Hbc.load("with-depends-on-formula-multiple") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-formula-multiple.rb") cask.depends_on.formula.wont_be_nil end end describe "depends_on cask" do it "allows depends_on cask to be specified" do - cask = Hbc.load("with-depends-on-cask") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-cask.rb") cask.depends_on.cask.wont_be_nil end it "allows multiple depends_on cask to be specified" do - cask = Hbc.load("with-depends-on-cask-multiple") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-cask-multiple.rb") cask.depends_on.cask.wont_be_nil end end describe "depends_on macos" do it "allows depends_on macos to be specified" do - cask = Hbc.load("with-depends-on-macos-string") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-macos-string.rb") cask.depends_on.macos.wont_be_nil end it "refuses to load with an invalid depends_on macos value" do lambda { - Hbc.load("invalid/invalid-depends-on-macos-bad-release") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-depends-on-macos-bad-release.rb") }.must_raise(Hbc::CaskInvalidError) end it "refuses to load with conflicting depends_on macos forms" do lambda { - Hbc.load("invalid/invalid-depends-on-macos-conflicting-forms") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb") }.must_raise(Hbc::CaskInvalidError) end end describe "depends_on arch" do it "allows depends_on arch to be specified" do - cask = Hbc.load("with-depends-on-arch") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-arch.rb") cask.depends_on.arch.wont_be_nil end it "refuses to load with an invalid depends_on arch value" do lambda { - Hbc.load("invalid/invalid-depends-on-arch-value") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-depends-on-arch-value.rb") }.must_raise(Hbc::CaskInvalidError) end end describe "depends_on x11" do it "allows depends_on x11 to be specified" do - cask = Hbc.load("with-depends-on-x11") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-x11.rb") cask.depends_on.x11.wont_be_nil end it "refuses to load with an invalid depends_on x11 value" do lambda { - Hbc.load("invalid/invalid-depends-on-x11-value") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-depends-on-x11-value.rb") }.must_raise(Hbc::CaskInvalidError) end end describe "conflicts_with stanza" do it "allows conflicts_with stanza to be specified" do - cask = Hbc.load("with-conflicts-with") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-conflicts-with.rb") cask.conflicts_with.formula.wont_be_nil end it "refuses to load invalid conflicts_with key" do lambda { - Hbc.load("invalid/invalid-conflicts-with-key") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-conflicts-with-key.rb") }.must_raise(Hbc::CaskInvalidError) end end describe "installer stanza" do it "allows installer script to be specified" do - cask = Hbc.load("with-installer-script") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installer-script.rb") cask.artifacts[:installer].first.script[:executable].must_equal "/usr/bin/true" cask.artifacts[:installer].first.script[:args].must_equal ["--flag"] cask.artifacts[:installer].to_a[1].script[:executable].must_equal "/usr/bin/false" cask.artifacts[:installer].to_a[1].script[:args].must_equal ["--flag"] end it "allows installer manual to be specified" do - cask = Hbc.load("with-installer-manual") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installer-manual.rb") cask.artifacts[:installer].first.manual.must_equal "Caffeine.app" end end describe "stage_only stanza" do it "allows stage_only stanza to be specified" do - cask = Hbc.load("stage-only") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/stage-only.rb") cask.artifacts[:stage_only].first.must_equal [true] end it "prevents specifying stage_only with other activatables" do err = lambda { - Hbc.load("invalid/invalid-stage-only-conflict") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/invalid/invalid-stage-only-conflict.rb") }.must_raise(Hbc::CaskInvalidError) err.message.must_include "'stage_only' must be the only activatable artifact" end @@ -450,14 +450,14 @@ describe Hbc::DSL do describe "auto_updates stanza" do it "allows auto_updates stanza to be specified" do - cask = Hbc.load("auto-updates") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/auto-updates.rb") cask.auto_updates.must_equal true end end describe "appdir" do it "allows interpolation of the appdir value in stanzas" do - cask = Hbc.load("appdir-interpolation") + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/appdir-interpolation.rb") cask.artifacts[:binary].first.must_equal ["#{Hbc.appdir}/some/path"] end diff --git a/Library/Homebrew/cask/test/cask/installer_test.rb b/Library/Homebrew/cask/test/cask/installer_test.rb index d76411ae6f6cd76df6958b5361ec942695ffe24d..b26c288478da82328c54e4af140621e04ccb1ad4 100644 --- a/Library/Homebrew/cask/test/cask/installer_test.rb +++ b/Library/Homebrew/cask/test/cask/installer_test.rb @@ -7,7 +7,7 @@ describe Hbc::Installer do } it "downloads and installs a nice fresh Cask" do - caffeine = Hbc.load("local-caffeine") + caffeine = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") shutup do Hbc::Installer.new(caffeine).install @@ -20,7 +20,7 @@ describe Hbc::Installer do end it "works with dmg-based Casks" do - asset = Hbc.load("container-dmg") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-dmg.rb") shutup do Hbc::Installer.new(asset).install @@ -33,7 +33,7 @@ describe Hbc::Installer do end it "works with tar-gz-based Casks" do - asset = Hbc.load("container-tar-gz") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-tar-gz.rb") shutup do Hbc::Installer.new(asset).install @@ -47,7 +47,7 @@ describe Hbc::Installer do it "works with cab-based Casks" do skip("cabextract not installed") if which("cabextract").nil? - asset = Hbc.load("container-cab") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-cab.rb") asset.stub :depends_on, empty_depends_on_stub do shutup do @@ -63,7 +63,7 @@ describe Hbc::Installer do it "works with Adobe AIR-based Casks" do skip("Adobe AIR not installed") unless Hbc::Container::Air.installer_exist? - asset = Hbc.load("container-air") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-air.rb") shutup do Hbc::Installer.new(asset).install @@ -77,7 +77,7 @@ describe Hbc::Installer do it "works with 7z-based Casks" do skip("unar not installed") if which("unar").nil? - asset = Hbc.load("container-7z") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-7z.rb") asset.stub :depends_on, empty_depends_on_stub do shutup do @@ -92,7 +92,7 @@ describe Hbc::Installer do end it "works with xar-based Casks" do - asset = Hbc.load("container-xar") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-xar.rb") shutup do Hbc::Installer.new(asset).install @@ -106,7 +106,7 @@ describe Hbc::Installer do it "works with Stuffit-based Casks" do skip("unar not installed") if which("unar").nil? - asset = Hbc.load("container-sit") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-sit.rb") asset.stub :depends_on, empty_depends_on_stub do shutup do @@ -122,7 +122,7 @@ describe Hbc::Installer do it "works with RAR-based Casks" do skip("unar not installed") if which("unar").nil? - asset = Hbc.load("container-rar") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-rar.rb") asset.stub :depends_on, empty_depends_on_stub do shutup do @@ -137,7 +137,7 @@ describe Hbc::Installer do end it "works with pure bzip2-based Casks" do - asset = Hbc.load("container-bzip2") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-bzip2.rb") shutup do Hbc::Installer.new(asset).install @@ -150,7 +150,7 @@ describe Hbc::Installer do end it "works with pure gzip-based Casks" do - asset = Hbc.load("container-gzip") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-gzip.rb") shutup do Hbc::Installer.new(asset).install @@ -164,7 +164,7 @@ describe Hbc::Installer do it "works with pure xz-based Casks" do skip("unxz not installed") if which("unxz").nil? - asset = Hbc.load("container-xz") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-xz.rb") asset.stub :depends_on, empty_depends_on_stub do shutup do @@ -180,7 +180,7 @@ describe Hbc::Installer do it "works with lzma-based Casks" do skip("unlzma not installed") if which("unlzma").nil? - asset = Hbc.load("container-lzma") + asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-lzma.rb") asset.stub :depends_on, empty_depends_on_stub do shutup do @@ -195,7 +195,7 @@ describe Hbc::Installer do end it "blows up on a bad checksum" do - bad_checksum = Hbc.load("bad-checksum") + bad_checksum = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/bad-checksum.rb") lambda { shutup do Hbc::Installer.new(bad_checksum).install @@ -204,7 +204,7 @@ describe Hbc::Installer do end it "blows up on a missing checksum" do - missing_checksum = Hbc.load("missing-checksum") + missing_checksum = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/missing-checksum.rb") lambda { shutup do Hbc::Installer.new(missing_checksum).install @@ -213,7 +213,7 @@ describe Hbc::Installer do end it "installs fine if sha256 :no_check is used" do - no_checksum = Hbc.load("no-checksum") + no_checksum = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/no-checksum.rb") shutup do Hbc::Installer.new(no_checksum).install @@ -223,14 +223,14 @@ describe Hbc::Installer do end it "fails to install if sha256 :no_check is used with --require-sha" do - no_checksum = Hbc.load("no-checksum") + no_checksum = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/no-checksum.rb") lambda { Hbc::Installer.new(no_checksum, require_sha: true).install }.must_raise(Hbc::CaskNoShasumError) end it "installs fine if sha256 :no_check is used with --require-sha and --force" do - no_checksum = Hbc.load("no-checksum") + no_checksum = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/no-checksum.rb") shutup do Hbc::Installer.new(no_checksum, require_sha: true, force: true).install @@ -240,7 +240,7 @@ describe Hbc::Installer do end it "prints caveats if they're present" do - with_caveats = Hbc.load("with-caveats") + with_caveats = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-caveats.rb") lambda { Hbc::Installer.new(with_caveats).install }.must_output(/Here are some things you might want to know/) @@ -248,7 +248,7 @@ describe Hbc::Installer do end it "prints installer :manual instructions when present" do - with_installer_manual = Hbc.load("with-installer-manual") + with_installer_manual = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installer-manual.rb") lambda { Hbc::Installer.new(with_installer_manual).install }.must_output(/To complete the installation of Cask with-installer-manual, you must also\nrun the installer at\n\n '#{with_installer_manual.staged_path.join('Caffeine.app')}'/) @@ -256,7 +256,7 @@ describe Hbc::Installer do end it "does not extract __MACOSX directories from zips" do - with_macosx_dir = Hbc.load("with-macosx-dir") + with_macosx_dir = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-macosx-dir.rb") shutup do Hbc::Installer.new(with_macosx_dir).install @@ -266,7 +266,7 @@ describe Hbc::Installer do end it "installer method raises an exception when already-installed Casks which auto-update are attempted" do - auto_updates = Hbc.load("auto-updates") + auto_updates = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/auto-updates.rb") auto_updates.installed?.must_equal false installer = Hbc::Installer.new(auto_updates) @@ -280,7 +280,7 @@ describe Hbc::Installer do end it "allows already-installed Casks which auto-update to be installed if force is provided" do - auto_updates = Hbc.load("auto-updates") + auto_updates = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/auto-updates.rb") auto_updates.installed?.must_equal false shutup do @@ -294,7 +294,7 @@ describe Hbc::Installer do # unlike the CLI, the internal interface throws exception on double-install it "installer method raises an exception when already-installed Casks are attempted" do - transmission = Hbc.load("local-transmission") + transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") transmission.installed?.must_equal false installer = Hbc::Installer.new(transmission) @@ -308,7 +308,7 @@ describe Hbc::Installer do end it "allows already-installed Casks to be installed if force is provided" do - transmission = Hbc.load("local-transmission") + transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") transmission.installed?.must_equal false shutup do @@ -321,7 +321,7 @@ describe Hbc::Installer do end it "works naked-pkg-based Casks" do - naked_pkg = Hbc.load("container-pkg") + naked_pkg = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-pkg.rb") shutup do Hbc::Installer.new(naked_pkg).install @@ -333,7 +333,7 @@ describe Hbc::Installer do end it "works properly with an overridden container :type" do - naked_executable = Hbc.load("naked-executable") + naked_executable = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/naked-executable.rb") shutup do Hbc::Installer.new(naked_executable).install @@ -345,7 +345,7 @@ describe Hbc::Installer do end it "works fine with a nested container" do - nested_app = Hbc.load("nested-app") + nested_app = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/nested-app.rb") shutup do Hbc::Installer.new(nested_app).install @@ -356,7 +356,7 @@ describe Hbc::Installer do end it "generates and finds a timestamped metadata directory for an installed Cask" do - caffeine = Hbc.load("local-caffeine") + caffeine = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") shutup do Hbc::Installer.new(caffeine).install @@ -368,7 +368,7 @@ describe Hbc::Installer do end it "generates and finds a metadata subdirectory for an installed Cask" do - caffeine = Hbc.load("local-caffeine") + caffeine = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") shutup do Hbc::Installer.new(caffeine).install @@ -383,7 +383,7 @@ describe Hbc::Installer do describe "uninstall" do it "fully uninstalls a Cask" do - caffeine = Hbc.load("local-caffeine") + caffeine = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") installer = Hbc::Installer.new(caffeine) shutup do @@ -397,7 +397,7 @@ describe Hbc::Installer do end it "uninstalls all versions if force is set" do - caffeine = Hbc.load("local-caffeine") + caffeine = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") mutated_version = caffeine.version + ".1" shutup do diff --git a/Library/Homebrew/cask/test/cask/staged_test.rb b/Library/Homebrew/cask/test/cask/staged_test.rb index fe3bf23399dfd5d6b6e38382d6d8fdefffb56fb3..2b601a6aeda9b214b317908288420ec8aa7e20a7 100644 --- a/Library/Homebrew/cask/test/cask/staged_test.rb +++ b/Library/Homebrew/cask/test/cask/staged_test.rb @@ -6,7 +6,7 @@ require "test_helper" describe "Operations on staged Casks" do describe "bundle ID" do it "fetches the bundle ID from a staged cask" do - transmission_cask = Hbc.load("local-transmission") + transmission_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") tr_installer = Hbc::Installer.new(transmission_cask) shutup do diff --git a/Library/Homebrew/cask/test/cask/url_checker_test.rb b/Library/Homebrew/cask/test/cask/url_checker_test.rb index 199182bf299ab469cb751c23d146995b4bfd07ba..afd4532ddd4ba46496a602a703f6f0c55d7f58f4 100644 --- a/Library/Homebrew/cask/test/cask/url_checker_test.rb +++ b/Library/Homebrew/cask/test/cask/url_checker_test.rb @@ -2,7 +2,7 @@ require "test_helper" describe Hbc::UrlChecker do describe "request processing" do - let(:cask) { Hbc.load("basic-cask") } + let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:checker) { Hbc::UrlChecker.new(cask) } let(:with_stubbed_fetcher) { lambda { |&block| diff --git a/Library/Homebrew/cask/test/cask_test.rb b/Library/Homebrew/cask/test/cask_test.rb index 64fc21965599c5e6fd7026a598a6395a7ce2b65c..d3abda2745aa1e886881b2dab2a666028deb4d2f 100644 --- a/Library/Homebrew/cask/test/cask_test.rb +++ b/Library/Homebrew/cask/test/cask_test.rb @@ -41,8 +41,8 @@ describe "Cask" do end it "uses exact match when loading by token" do - Hbc.load("test-opera").token.must_equal("test-opera") - Hbc.load("test-opera-mail").token.must_equal("test-opera-mail") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/test-opera.rb").token.must_equal("test-opera") + Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/test-opera-mail.rb").token.must_equal("test-opera-mail") end it "raises an error when attempting to load a Cask that doesn't exist" do diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb index 7315839f58a507ed7f5a2ec4ee1c9665598206f3..641409284b7eac6b24d86249ffe82c38b1835352 100644 --- a/Library/Homebrew/cask/test/test_helper.rb +++ b/Library/Homebrew/cask/test/test_helper.rb @@ -46,7 +46,7 @@ Hbc.caskroom = Hbc.default_caskroom.tap(&:mkpath) Hbc.default_tap = Tap.fetch("caskroom", "test").tap do |tap| # link test casks FileUtils.mkdir_p tap.path.dirname - FileUtils.ln_s Pathname.new(__FILE__).dirname.join("support"), tap.path + FileUtils.ln_s TEST_FIXTURE_DIR.join("cask"), tap.path end # pretend that the caskroom/cask Tap is installed diff --git a/Library/Homebrew/cask/spec/support/Casks/appcast-checkpoint-sha256-for-empty-string.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/appcast-checkpoint-sha256-for-empty-string.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/appcast-checkpoint-sha256-for-empty-string.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/appcast-checkpoint-sha256-for-empty-string.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/appcast-invalid-checkpoint.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/appcast-invalid-checkpoint.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/appcast-invalid-checkpoint.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/appcast-invalid-checkpoint.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/appcast-missing-checkpoint.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/appcast-missing-checkpoint.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/appcast-missing-checkpoint.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/appcast-missing-checkpoint.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/appcast-valid-checkpoint.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/appcast-valid-checkpoint.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/appcast-valid-checkpoint.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/appcast-valid-checkpoint.rb diff --git a/Library/Homebrew/cask/test/support/Casks/appdir-interpolation.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/appdir-interpolation.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/appdir-interpolation.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/appdir-interpolation.rb diff --git a/Library/Homebrew/cask/test/support/Casks/auto-updates.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/auto-updates.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/auto-updates.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/auto-updates.rb diff --git a/Library/Homebrew/cask/test/support/Casks/bad-checksum.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/bad-checksum.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/bad-checksum.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/bad-checksum.rb diff --git a/Library/Homebrew/cask/test/support/Casks/basic-cask.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/basic-cask.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/basic-cask.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/basic-cask.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/booby-trap.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/booby-trap.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/booby-trap.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/booby-trap.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-7z.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-7z.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-7z.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-7z.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-air.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-air.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-air.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-air.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-bzip2.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-bzip2.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-bzip2.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-bzip2.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-cab.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-cab.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-cab.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-cab.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-dmg.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-dmg.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-dmg.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-dmg.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-gzip.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-gzip.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-gzip.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-gzip.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-lzma.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-lzma.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-lzma.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-lzma.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-pkg.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-pkg.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-pkg.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-pkg.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-rar.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-rar.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-rar.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-rar.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-sit.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-sit.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-sit.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-sit.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-tar-gz.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-tar-gz.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-tar-gz.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-tar-gz.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-xar.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-xar.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-xar.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-xar.rb diff --git a/Library/Homebrew/cask/test/support/Casks/container-xz.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-xz.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/container-xz.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/container-xz.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/generic-artifact-absolute-target.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/generic-artifact-absolute-target.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/generic-artifact-absolute-target.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/generic-artifact-absolute-target.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/generic-artifact-no-target.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/generic-artifact-no-target.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/generic-artifact-no-target.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/generic-artifact-no-target.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/generic-artifact-relative-target.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/generic-artifact-relative-target.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/generic-artifact-relative-target.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/generic-artifact-relative-target.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/invalid-sha256.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid-sha256.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/invalid-sha256.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid-sha256.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-multiple.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-appcast-multiple.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-multiple.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-appcast-multiple.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-url.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-appcast-url.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-appcast-url.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-appcast-url.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-conflicts-with-key.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-conflicts-with-key.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-conflicts-with-key.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-conflicts-with-key.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-arch-value.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-arch-value.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-arch-value.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-arch-value.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-key.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-key.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-key.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-key.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-bad-release.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-macos-bad-release.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-bad-release.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-macos-bad-release.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-macos-conflicting-forms.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-x11-value.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-x11-value.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-depends-on-x11-value.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-depends-on-x11-value.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-conflicting-keys.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-conflicting-keys.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-conflicting-keys.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-conflicting-keys.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-id.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-key-id.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-id.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-key-id.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-url.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-key-url.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-key-url.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-key-url.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-missing-key.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-missing-key.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-missing-key.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-missing-key.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-multiple-stanzas.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-multiple-stanzas.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-multiple-stanzas.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-multiple-stanzas.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-parameter.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-parameter.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-parameter.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-parameter.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-signature-url.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-signature-url.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-signature-url.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-signature-url.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-type.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-type.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-gpg-type.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-gpg-type.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-format.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-header-format.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-format.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-header-format.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-token-mismatch.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-header-token-mismatch.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-token-mismatch.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-header-token-mismatch.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-version.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-header-version.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-header-version.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-header-version.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-stage-only-conflict.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-stage-only-conflict.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-stage-only-conflict.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-stage-only-conflict.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-homepage.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-two-homepage.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-homepage.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-two-homepage.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-url.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-two-url.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-url.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-two-url.rb diff --git a/Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-version.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-two-version.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/invalid/invalid-two-version.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/invalid/invalid-two-version.rb diff --git a/Library/Homebrew/cask/test/support/Casks/local-caffeine.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/local-caffeine.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/local-caffeine.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/local-caffeine.rb diff --git a/Library/Homebrew/cask/test/support/Casks/local-transmission.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/local-transmission.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/local-transmission.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/local-transmission.rb diff --git a/Library/Homebrew/cask/test/support/Casks/missing-checksum.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/missing-checksum.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/missing-checksum.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/missing-checksum.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/missing-homepage.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/missing-homepage.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/missing-homepage.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/missing-homepage.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/missing-name.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/missing-name.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/missing-name.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/missing-name.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/missing-sha256.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/missing-sha256.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/missing-sha256.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/missing-sha256.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/missing-url.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/missing-url.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/missing-url.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/missing-url.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/missing-version.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/missing-version.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/missing-version.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/missing-version.rb diff --git a/Library/Homebrew/cask/test/support/Casks/naked-executable.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/naked-executable.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/naked-executable.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/naked-executable.rb diff --git a/Library/Homebrew/cask/test/support/Casks/nested-app.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/nested-app.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/nested-app.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/nested-app.rb diff --git a/Library/Homebrew/cask/test/support/Casks/no-checksum.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/no-checksum.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/no-checksum.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/no-checksum.rb diff --git a/Library/Homebrew/cask/test/support/Casks/no-dsl-version.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/no-dsl-version.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/no-dsl-version.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/no-dsl-version.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/osdn-correct-url-format.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/osdn-correct-url-format.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/osdn-correct-url-format.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/osdn-correct-url-format.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/osdn-incorrect-url-format.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/osdn-incorrect-url-format.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/osdn-incorrect-url-format.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/osdn-incorrect-url-format.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/sha256-for-empty-string.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/sha256-for-empty-string.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/sha256-for-empty-string.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/sha256-for-empty-string.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/sourceforge-correct-url-format.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/sourceforge-correct-url-format.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/sourceforge-correct-url-format.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/sourceforge-correct-url-format.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/sourceforge-incorrect-url-format.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/sourceforge-incorrect-url-format.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/sourceforge-incorrect-url-format.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/sourceforge-incorrect-url-format.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/sourceforge-version-latest-correct-url-format.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/sourceforge-version-latest-correct-url-format.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/sourceforge-version-latest-correct-url-format.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/sourceforge-version-latest-correct-url-format.rb diff --git a/Library/Homebrew/cask/test/support/Casks/stage-only.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/stage-only.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/stage-only.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/stage-only.rb diff --git a/Library/Homebrew/cask/test/support/Casks/test-opera-mail.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/test-opera-mail.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/test-opera-mail.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/test-opera-mail.rb diff --git a/Library/Homebrew/cask/test/support/Casks/test-opera.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/test-opera.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/test-opera.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/test-opera.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/version-latest-string.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/version-latest-string.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/version-latest-string.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/version-latest-string.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/version-latest-with-checksum.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/version-latest-with-checksum.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/version-latest-with-checksum.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/version-latest-with-checksum.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-accessibility-access.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-accessibility-access.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-accessibility-access.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-accessibility-access.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-alt-target.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-alt-target.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-alt-target.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-alt-target.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-appcast.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-appcast.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-appcast.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-appcast.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/with-binary.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-binary.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/with-binary.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-binary.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-caveats.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-caveats.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-caveats.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-caveats.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-choices.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-choices.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-choices.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-choices.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-conditional-caveats.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-conditional-caveats.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-conditional-caveats.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-conditional-caveats.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-conflicts-with.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-conflicts-with.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-conflicts-with.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-conflicts-with.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-arch.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-arch.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-arch.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-arch.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic-helper.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask-cyclic-helper.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic-helper.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask-cyclic-helper.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask-cyclic.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-cyclic.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask-cyclic.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-multiple.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask-multiple.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-cask-multiple.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask-multiple.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-cask.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-cask.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula-multiple.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-formula-multiple.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-formula-multiple.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-formula-multiple.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-formula.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-formula.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-formula.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-formula.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-array.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-array.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-array.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-array.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-comparison.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-comparison.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-comparison.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-comparison.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-failure.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-failure.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-failure.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-failure.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-string.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-string.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-string.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-string.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-symbol.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-symbol.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-macos-symbol.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-symbol.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11-false.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-x11-false.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-x11-false.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-x11-false.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-depends-on-x11.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-x11.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-depends-on-x11.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-x11.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-dsl-version.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-dsl-version.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-dsl-version.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-dsl-version.rb diff --git a/Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-embedded-binary.rb similarity index 100% rename from Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-embedded-binary.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-generic-artifact-no-target.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-generic-artifact-no-target.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-generic-artifact-no-target.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-generic-artifact-no-target.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-generic-artifact.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-generic-artifact.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-generic-artifact.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-generic-artifact.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-gpg-key-url.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-gpg-key-url.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-gpg-key-url.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-gpg-key-url.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-gpg.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-gpg.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-gpg.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-gpg.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-installable.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-installable.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-installable.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-installable.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-installer-manual.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-installer-manual.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-installer-manual.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-installer-manual.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-installer-script.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-installer-script.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-installer-script.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-installer-script.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-macosx-dir.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-macosx-dir.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-macosx-dir.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-macosx-dir.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-pkgutil-zap.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-pkgutil-zap.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-pkgutil-zap.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-pkgutil-zap.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-suite.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-suite.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-suite.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-suite.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-two-apps-correct.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-two-apps-correct.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-two-apps-correct.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-two-apps-correct.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-two-apps-incorrect.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-two-apps-incorrect.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-two-apps-incorrect.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-two-apps-incorrect.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-two-apps-subdir.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-two-apps-subdir.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-two-apps-subdir.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-two-apps-subdir.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-delete.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-delete.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-delete.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-delete.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-early-script.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-early-script.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-early-script.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-early-script.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-kext.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-kext.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-kext.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-kext.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-launchctl.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-launchctl.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-launchctl.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-launchctl.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-login-item.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-login-item.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-login-item.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-login-item.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-pkgutil.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-pkgutil.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-pkgutil.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-pkgutil.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-quit.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-quit.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-quit.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-quit.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-rmdir.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-rmdir.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-rmdir.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-rmdir.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-script.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-script.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-script.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-script.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-signal.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-signal.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-signal.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-signal.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-uninstall-trash.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-trash.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-uninstall-trash.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-trash.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-delete.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-delete.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-delete.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-delete.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-early-script.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-early-script.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-early-script.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-early-script.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-kext.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-kext.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-kext.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-kext.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-launchctl.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-launchctl.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-launchctl.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-launchctl.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-login-item.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-login-item.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-login-item.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-login-item.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-pkgutil.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-pkgutil.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-pkgutil.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-pkgutil.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-quit.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-quit.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-quit.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-quit.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-rmdir.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-rmdir.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-rmdir.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-rmdir.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-script.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-script.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-script.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-script.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-signal.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-signal.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-signal.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-signal.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap-trash.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-trash.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap-trash.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-trash.rb diff --git a/Library/Homebrew/cask/test/support/Casks/with-zap.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/with-zap.rb similarity index 100% rename from Library/Homebrew/cask/test/support/Casks/with-zap.rb rename to Library/Homebrew/test/support/fixtures/cask/Casks/with-zap.rb