diff --git a/Library/Homebrew/cask/spec/cask/accessibility_spec.rb b/Library/Homebrew/cask/spec/cask/accessibility_spec.rb index 71bebfa4b8..4ac757e696 100644 --- a/Library/Homebrew/cask/spec/cask/accessibility_spec.rb +++ b/Library/Homebrew/cask/spec/cask/accessibility_spec.rb @@ -1,8 +1,6 @@ -require "spec_helper" - # TODO: this test should be named after the corresponding class, once # that class is abstracted from installer.rb. -describe "Accessibility Access" do +describe "Accessibility Access", :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-accessibility-access.rb") } let(:fake_system_command) { class_double(Hbc::SystemCommand) } let(:installer) { Hbc::Installer.new(cask, command: fake_system_command) } diff --git a/Library/Homebrew/cask/spec/cask/artifact/alt_target_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/alt_target_spec.rb index 9a57a9878d..9bcdd27a10 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/alt_target_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/alt_target_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::App do +describe Hbc::Artifact::App, :cask do describe "activate to alternate target" do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-alt-target.rb") } diff --git a/Library/Homebrew/cask/spec/cask/artifact/app_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/app_spec.rb index b3877f0002..bfd2d5cd4a 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/app_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/app_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::App do +describe Hbc::Artifact::App, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") } let(:command) { Hbc::SystemCommand } let(:force) { false } diff --git a/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb index c27dcc8f0f..1b26773caf 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/binary_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::Artifact::Binary do +describe Hbc::Artifact::Binary, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-binary.rb").tap do |cask| shutup do diff --git a/Library/Homebrew/cask/spec/cask/artifact/generic_artifact_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/generic_artifact_spec.rb index 7d9128c0ea..b383e2d4ea 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/generic_artifact_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/generic_artifact_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::Artifact do +describe Hbc::Artifact::Artifact, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-generic-artifact.rb") } let(:install_phase) { diff --git a/Library/Homebrew/cask/spec/cask/artifact/nested_container_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/nested_container_spec.rb index 31a1cb5eb6..3e9a549ea0 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/nested_container_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/nested_container_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::NestedContainer do +describe Hbc::Artifact::NestedContainer, :cask do describe "install" do it "extracts the specified paths as containers" do cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/nested-app.rb").tap do |c| diff --git a/Library/Homebrew/cask/spec/cask/artifact/pkg_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/pkg_spec.rb index 93ef2ecdfe..249439900b 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/pkg_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/pkg_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::Pkg do +describe Hbc::Artifact::Pkg, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:fake_system_command) { class_double(Hbc::SystemCommand) } diff --git a/Library/Homebrew/cask/spec/cask/artifact/postflight_block_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/postflight_block_spec.rb index 6f58afb2ad..51b1431f03 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/postflight_block_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/postflight_block_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::PostflightBlock do +describe Hbc::Artifact::PostflightBlock, :cask do describe "install_phase" do it "calls the specified block after installing, passing a Cask mini-dsl" do called = false diff --git a/Library/Homebrew/cask/spec/cask/artifact/preflight_block_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/preflight_block_spec.rb index ac5313bcae..b13c4ab9d3 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/preflight_block_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/preflight_block_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::PreflightBlock do +describe Hbc::Artifact::PreflightBlock, :cask do describe "install_phase" do it "calls the specified block before installing, passing a Cask mini-dsl" do called = false diff --git a/Library/Homebrew/cask/spec/cask/artifact/suite_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/suite_spec.rb index 79ca0546c0..98ae933114 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/suite_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/suite_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::Suite do +describe Hbc::Artifact::Suite, :cask do 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/spec/cask/artifact/two_apps_correct_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/two_apps_correct_spec.rb index 7fa44dbce8..9db22b2a3b 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/two_apps_correct_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/two_apps_correct_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::App do +describe Hbc::Artifact::App, :cask do describe "multiple apps" do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-two-apps-correct.rb") } diff --git a/Library/Homebrew/cask/spec/cask/artifact/two_apps_incorrect_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/two_apps_incorrect_spec.rb index 0aa38d9106..6427ec32c3 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/two_apps_incorrect_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/two_apps_incorrect_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::App do +describe Hbc::Artifact::App, :cask do # FIXME: Doesn't actually raise because the `app` stanza is not evaluated on load. # it "must raise" do # lambda { diff --git a/Library/Homebrew/cask/spec/cask/artifact/uninstall_no_zap_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/uninstall_no_zap_spec.rb index 3150b50bee..f88aaa49dd 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/uninstall_no_zap_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/uninstall_no_zap_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::Zap do +describe Hbc::Artifact::Zap, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:zap_artifact) { diff --git a/Library/Homebrew/cask/spec/cask/artifact/uninstall_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/uninstall_spec.rb index 4c09ea302a..b7deb4575b 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/uninstall_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/uninstall_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Artifact::Uninstall do +describe Hbc::Artifact::Uninstall, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:uninstall_artifact) { diff --git a/Library/Homebrew/cask/spec/cask/artifact/zap_spec.rb b/Library/Homebrew/cask/spec/cask/artifact/zap_spec.rb index 47090c99a3..fdf2e4f9db 100644 --- a/Library/Homebrew/cask/spec/cask/artifact/zap_spec.rb +++ b/Library/Homebrew/cask/spec/cask/artifact/zap_spec.rb @@ -1,7 +1,5 @@ -require "spec_helper" - # TODO: test that zap removes an alternate version of the same Cask -describe Hbc::Artifact::Zap do +describe Hbc::Artifact::Zap, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:zap_artifact) { diff --git a/Library/Homebrew/cask/spec/cask/audit_spec.rb b/Library/Homebrew/cask/spec/cask/audit_spec.rb index 222294bdc1..802807fcb4 100644 --- a/Library/Homebrew/cask/spec/cask/audit_spec.rb +++ b/Library/Homebrew/cask/spec/cask/audit_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::Audit do +describe Hbc::Audit, :cask do def include_msg?(messages, msg) if msg.is_a?(Regexp) Array(messages).any? { |m| m =~ msg } diff --git a/Library/Homebrew/cask/spec/cask/cask_spec.rb b/Library/Homebrew/cask/spec/cask/cask_spec.rb index b926be6276..d76f2dce95 100644 --- a/Library/Homebrew/cask/spec/cask/cask_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cask_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::Cask do +describe Hbc::Cask, :cask do let(:cask) { described_class.new("versioned-cask") } context "when multiple versions are installed" do diff --git a/Library/Homebrew/cask/spec/cask/cli/audit_spec.rb b/Library/Homebrew/cask/spec/cask/cli/audit_spec.rb index b520a88df8..2736e60c15 100644 --- a/Library/Homebrew/cask/spec/cask/cli/audit_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/audit_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Audit do +describe Hbc::CLI::Audit, :cask do let(:auditor) { double } let(:cask) { double } diff --git a/Library/Homebrew/cask/spec/cask/cli/cat_spec.rb b/Library/Homebrew/cask/spec/cask/cli/cat_spec.rb index 7517c1b5c5..daf6fb960f 100644 --- a/Library/Homebrew/cask/spec/cask/cli/cat_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/cat_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Cat do +describe Hbc::CLI::Cat, :cask do describe "given a basic Cask" do let(:expected_output) { <<-EOS.undent diff --git a/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb b/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb index 2f4028e2af..f8578e80df 100644 --- a/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::CLI::Cleanup do +describe Hbc::CLI::Cleanup, :cask do let(:cache_location) { Pathname.new(Dir.mktmpdir).realpath } let(:cleanup_outdated) { false } diff --git a/Library/Homebrew/cask/spec/cask/cli/create_spec.rb b/Library/Homebrew/cask/spec/cask/cli/create_spec.rb index e3d484d879..21eaeb656f 100644 --- a/Library/Homebrew/cask/spec/cask/cli/create_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/create_spec.rb @@ -1,5 +1,3 @@ -require "spec_helper" - # monkeypatch for testing module Hbc class CLI @@ -19,7 +17,7 @@ module Hbc end end -describe Hbc::CLI::Create do +describe Hbc::CLI::Create, :cask do before(:each) do Hbc::CLI::Create.reset! end diff --git a/Library/Homebrew/cask/spec/cask/cli/edit_spec.rb b/Library/Homebrew/cask/spec/cask/cli/edit_spec.rb index 5ddf27a48a..61970290b3 100644 --- a/Library/Homebrew/cask/spec/cask/cli/edit_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/edit_spec.rb @@ -1,5 +1,3 @@ -require "spec_helper" - # monkeypatch for testing module Hbc class CLI @@ -19,7 +17,7 @@ module Hbc end end -describe Hbc::CLI::Edit do +describe Hbc::CLI::Edit, :cask do before(:each) do Hbc::CLI::Edit.reset! end diff --git a/Library/Homebrew/cask/spec/cask/cli/fetch_spec.rb b/Library/Homebrew/cask/spec/cask/cli/fetch_spec.rb index bb81334532..1571c2a701 100644 --- a/Library/Homebrew/cask/spec/cask/cli/fetch_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/fetch_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Fetch do +describe Hbc::CLI::Fetch, :cask do let(:local_transmission) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") } diff --git a/Library/Homebrew/cask/spec/cask/cli/home_spec.rb b/Library/Homebrew/cask/spec/cask/cli/home_spec.rb index a2b49b4333..a5359f24ff 100644 --- a/Library/Homebrew/cask/spec/cask/cli/home_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/home_spec.rb @@ -1,5 +1,3 @@ -require "spec_helper" - # monkeypatch for testing module Hbc class CLI @@ -19,7 +17,7 @@ module Hbc end end -describe Hbc::CLI::Home do +describe Hbc::CLI::Home, :cask do before do Hbc::CLI::Home.reset! end diff --git a/Library/Homebrew/cask/spec/cask/cli/info_spec.rb b/Library/Homebrew/cask/spec/cask/cli/info_spec.rb index 6977f81c3b..2f70a0b967 100644 --- a/Library/Homebrew/cask/spec/cask/cli/info_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/info_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Info do +describe Hbc::CLI::Info, :cask do it "displays some nice info about the specified Cask" do expect { Hbc::CLI::Info.run("local-caffeine") diff --git a/Library/Homebrew/cask/spec/cask/cli/install_spec.rb b/Library/Homebrew/cask/spec/cask/cli/install_spec.rb index 2544eacc89..5a40017e83 100644 --- a/Library/Homebrew/cask/spec/cask/cli/install_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/install_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Install do +describe Hbc::CLI::Install, :cask do it "allows staging and activation of multiple Casks at once" do shutup do Hbc::CLI::Install.run("local-transmission", "local-caffeine") diff --git a/Library/Homebrew/cask/spec/cask/cli/list_spec.rb b/Library/Homebrew/cask/spec/cask/cli/list_spec.rb index 49c06c5210..e367e95887 100644 --- a/Library/Homebrew/cask/spec/cask/cli/list_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/list_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::List do +describe Hbc::CLI::List, :cask do it "lists the installed Casks in a pretty fashion" do casks = %w[local-caffeine local-transmission].map { |c| Hbc.load(c) } diff --git a/Library/Homebrew/cask/spec/cask/cli/options_spec.rb b/Library/Homebrew/cask/spec/cask/cli/options_spec.rb index a4381213a6..86933e27ed 100644 --- a/Library/Homebrew/cask/spec/cask/cli/options_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/options_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI do +describe Hbc::CLI, :cask do it "supports setting the appdir" do Hbc::CLI.process_options %w[help --appdir=/some/path/foo] diff --git a/Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb b/Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb index df83c53e28..e573a3470c 100644 --- a/Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/reinstall_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Reinstall do +describe Hbc::CLI::Reinstall, :cask do it "allows reinstalling a Cask" do shutup do Hbc::CLI::Install.run("local-transmission") diff --git a/Library/Homebrew/cask/spec/cask/cli/search_spec.rb b/Library/Homebrew/cask/spec/cask/cli/search_spec.rb index b05d3fbde6..0bcff809af 100644 --- a/Library/Homebrew/cask/spec/cask/cli/search_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/search_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Search do +describe Hbc::CLI::Search, :cask do it "lists the available Casks that match the search term" do expect { Hbc::CLI::Search.run("local") diff --git a/Library/Homebrew/cask/spec/cask/cli/uninstall_spec.rb b/Library/Homebrew/cask/spec/cask/cli/uninstall_spec.rb index f451af2774..cbfb3e2370 100644 --- a/Library/Homebrew/cask/spec/cask/cli/uninstall_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/uninstall_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Uninstall do +describe Hbc::CLI::Uninstall, :cask do it "shows an error when a bad Cask is provided" do expect { Hbc::CLI::Uninstall.run("notacask") diff --git a/Library/Homebrew/cask/spec/cask/cli/version_spec.rb b/Library/Homebrew/cask/spec/cask/cli/version_spec.rb index e6fcf48501..2091496fc9 100644 --- a/Library/Homebrew/cask/spec/cask/cli/version_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/version_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe "brew cask --version" do +describe "brew cask --version", :cask do it "respects the --version argument" do expect { expect { diff --git a/Library/Homebrew/cask/spec/cask/cli/zap_spec.rb b/Library/Homebrew/cask/spec/cask/cli/zap_spec.rb index d26114567f..0f3d024b5c 100644 --- a/Library/Homebrew/cask/spec/cask/cli/zap_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/zap_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::CLI::Zap do +describe Hbc::CLI::Zap, :cask do it "shows an error when a bad Cask is provided" do expect { Hbc::CLI::Zap.run("notacask") diff --git a/Library/Homebrew/cask/spec/cask/cli_spec.rb b/Library/Homebrew/cask/spec/cask/cli_spec.rb index 6b2313a41c..1ad6790a3b 100644 --- a/Library/Homebrew/cask/spec/cask/cli_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::CLI do +describe Hbc::CLI, :cask do it "lists the taps for Casks that show up in two taps" do listing = Hbc::CLI.nice_listing(%w[ caskroom/cask/adium diff --git a/Library/Homebrew/cask/spec/cask/container/dmg_spec.rb b/Library/Homebrew/cask/spec/cask/container/dmg_spec.rb index cf35b75454..a94362aba5 100644 --- a/Library/Homebrew/cask/spec/cask/container/dmg_spec.rb +++ b/Library/Homebrew/cask/spec/cask/container/dmg_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Container::Dmg do +describe Hbc::Container::Dmg, :cask do describe "#mount!" do it "does not store nil mounts for dmgs with extra data" do transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") diff --git a/Library/Homebrew/cask/spec/cask/container/naked_spec.rb b/Library/Homebrew/cask/spec/cask/container/naked_spec.rb index ee4102ecab..eb30ef81a4 100644 --- a/Library/Homebrew/cask/spec/cask/container/naked_spec.rb +++ b/Library/Homebrew/cask/spec/cask/container/naked_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Container::Naked do +describe Hbc::Container::Naked, :cask do it "saves files with spaces in them from uris with encoded spaces" do cask = Hbc::Cask.new("spacey") do url "http://example.com/kevin%20spacey.pkg" diff --git a/Library/Homebrew/cask/spec/cask/depends_on_spec.rb b/Library/Homebrew/cask/spec/cask/depends_on_spec.rb index 078a2bce74..81fda23293 100644 --- a/Library/Homebrew/cask/spec/cask/depends_on_spec.rb +++ b/Library/Homebrew/cask/spec/cask/depends_on_spec.rb @@ -1,8 +1,6 @@ -require "spec_helper" - # TODO: this test should be named after the corresponding class, once # that class is abstracted from installer.rb -describe "Satisfy Dependencies and Requirements" do +describe "Satisfy Dependencies and Requirements", :cask do subject { lambda do shutup do diff --git a/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb b/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb index 900ceb3e29..ca082c581f 100644 --- a/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb +++ b/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb @@ -1,4 +1,4 @@ -describe "download strategies" do +describe "download strategies", :cask do let(:url) { "http://example.com/cask.dmg" } let(:url_options) { Hash.new } let(:cask) { diff --git a/Library/Homebrew/cask/spec/cask/dsl/caveats_spec.rb b/Library/Homebrew/cask/spec/cask/dsl/caveats_spec.rb index 07940cd0af..aa662e4d02 100644 --- a/Library/Homebrew/cask/spec/cask/dsl/caveats_spec.rb +++ b/Library/Homebrew/cask/spec/cask/dsl/caveats_spec.rb @@ -1,7 +1,6 @@ -require "spec_helper" require "test/support/helper/spec/shared_examples/hbc_dsl_base" -describe Hbc::DSL::Caveats do +describe Hbc::DSL::Caveats, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::Caveats.new(cask) } diff --git a/Library/Homebrew/cask/spec/cask/dsl/postflight_spec.rb b/Library/Homebrew/cask/spec/cask/dsl/postflight_spec.rb index d7a8f219dd..d2b080ca30 100644 --- a/Library/Homebrew/cask/spec/cask/dsl/postflight_spec.rb +++ b/Library/Homebrew/cask/spec/cask/dsl/postflight_spec.rb @@ -1,8 +1,7 @@ -require "spec_helper" require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_staged" -describe Hbc::DSL::Postflight do +describe Hbc::DSL::Postflight, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::Postflight.new(cask, Hbc::FakeSystemCommand) } diff --git a/Library/Homebrew/cask/spec/cask/dsl/preflight_spec.rb b/Library/Homebrew/cask/spec/cask/dsl/preflight_spec.rb index 81b0c79757..b93be95ff8 100644 --- a/Library/Homebrew/cask/spec/cask/dsl/preflight_spec.rb +++ b/Library/Homebrew/cask/spec/cask/dsl/preflight_spec.rb @@ -1,8 +1,7 @@ -require "spec_helper" require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_staged" -describe Hbc::DSL::Preflight do +describe Hbc::DSL::Preflight, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::Preflight.new(cask, Hbc::FakeSystemCommand) } diff --git a/Library/Homebrew/cask/spec/cask/dsl/uninstall_postflight_spec.rb b/Library/Homebrew/cask/spec/cask/dsl/uninstall_postflight_spec.rb index 448e1b411e..f89a181ce2 100644 --- a/Library/Homebrew/cask/spec/cask/dsl/uninstall_postflight_spec.rb +++ b/Library/Homebrew/cask/spec/cask/dsl/uninstall_postflight_spec.rb @@ -1,7 +1,6 @@ -require "spec_helper" require "test/support/helper/spec/shared_examples/hbc_dsl_base" -describe Hbc::DSL::UninstallPostflight do +describe Hbc::DSL::UninstallPostflight, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::UninstallPostflight.new(cask, Hbc::FakeSystemCommand) } diff --git a/Library/Homebrew/cask/spec/cask/dsl/uninstall_preflight_spec.rb b/Library/Homebrew/cask/spec/cask/dsl/uninstall_preflight_spec.rb index aac34e76a6..15a0ea1565 100644 --- a/Library/Homebrew/cask/spec/cask/dsl/uninstall_preflight_spec.rb +++ b/Library/Homebrew/cask/spec/cask/dsl/uninstall_preflight_spec.rb @@ -1,8 +1,7 @@ -require "spec_helper" require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_staged" -describe Hbc::DSL::UninstallPreflight do +describe Hbc::DSL::UninstallPreflight, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:dsl) { Hbc::DSL::UninstallPreflight.new(cask, Hbc::FakeSystemCommand) } diff --git a/Library/Homebrew/cask/spec/cask/dsl_spec.rb b/Library/Homebrew/cask/spec/cask/dsl_spec.rb index 99525cc205..7872b42a63 100644 --- a/Library/Homebrew/cask/spec/cask/dsl_spec.rb +++ b/Library/Homebrew/cask/spec/cask/dsl_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::DSL do +describe Hbc::DSL, :cask do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/#{token}.rb") } let(:token) { "basic-cask" } @@ -76,7 +74,7 @@ describe Hbc::DSL do end end - context "when it contains a deprecated DSL version" do + context "when it contains a deprecated DSL version", :needs_compat do let(:token) { "with-dsl-version" } it "may use deprecated DSL version hash syntax" do diff --git a/Library/Homebrew/cask/spec/cask/installer_spec.rb b/Library/Homebrew/cask/spec/cask/installer_spec.rb index c0148c3874..7dd5b2bda6 100644 --- a/Library/Homebrew/cask/spec/cask/installer_spec.rb +++ b/Library/Homebrew/cask/spec/cask/installer_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Installer do +describe Hbc::Installer, :cask do describe "install" do let(:empty_depends_on_stub) { double(formula: [], cask: [], macos: nil, arch: nil, x11: nil) diff --git a/Library/Homebrew/cask/spec/cask/pkg_spec.rb b/Library/Homebrew/cask/spec/cask/pkg_spec.rb index 6610b0e481..78a2eb75e6 100644 --- a/Library/Homebrew/cask/spec/cask/pkg_spec.rb +++ b/Library/Homebrew/cask/spec/cask/pkg_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::Pkg do +describe Hbc::Pkg, :cask do describe "uninstall" do let(:fake_system_command) { Hbc::NeverSudoSystemCommand } let(:empty_response) { double(stdout: "") } diff --git a/Library/Homebrew/cask/spec/cask/scopes_spec.rb b/Library/Homebrew/cask/spec/cask/scopes_spec.rb index e6e507da89..330683b2a7 100644 --- a/Library/Homebrew/cask/spec/cask/scopes_spec.rb +++ b/Library/Homebrew/cask/spec/cask/scopes_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::Scopes do +describe Hbc::Scopes, :cask do describe "installed" do it "returns a list installed Casks by loading Casks for all the dirs that exist in the caskroom" do allow(Hbc).to receive(:load) { |token| "loaded-#{token}" } diff --git a/Library/Homebrew/cask/spec/cask/staged_spec.rb b/Library/Homebrew/cask/spec/cask/staged_spec.rb index 10f1cbb473..670775b7af 100644 --- a/Library/Homebrew/cask/spec/cask/staged_spec.rb +++ b/Library/Homebrew/cask/spec/cask/staged_spec.rb @@ -1,9 +1,7 @@ -require "spec_helper" - # TODO: this test should be named after the corresponding class, once # that class is abstracted from installer.rb. It makes little sense # to be invoking bundle_identifier off of the installer instance. -describe "Operations on staged Casks" do +describe "Operations on staged Casks", :cask do describe "bundle ID" do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") } let(:installer) { Hbc::Installer.new(cask) } diff --git a/Library/Homebrew/cask/spec/cask/system_command_result_spec.rb b/Library/Homebrew/cask/spec/cask/system_command_result_spec.rb index b15d4d437e..4a077de7b3 100644 --- a/Library/Homebrew/cask/spec/cask/system_command_result_spec.rb +++ b/Library/Homebrew/cask/spec/cask/system_command_result_spec.rb @@ -1,6 +1,6 @@ require "hbc/system_command" -describe Hbc::SystemCommand::Result do +describe Hbc::SystemCommand::Result, :cask do describe "::_parse_plist" do subject { described_class._parse_plist(command, input) } let(:command) { Hbc::SystemCommand.new("/usr/bin/true", {}) } diff --git a/Library/Homebrew/cask/spec/cask/system_command_spec.rb b/Library/Homebrew/cask/spec/cask/system_command_spec.rb index 3f9f8ac2bb..8d1180bea1 100644 --- a/Library/Homebrew/cask/spec/cask/system_command_spec.rb +++ b/Library/Homebrew/cask/spec/cask/system_command_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::SystemCommand do +describe Hbc::SystemCommand, :cask do describe "when the exit code is 0" do describe "its result" do subject { described_class.run("/usr/bin/true") } diff --git a/Library/Homebrew/cask/spec/cask/underscore_supporting_uri_spec.rb b/Library/Homebrew/cask/spec/cask/underscore_supporting_uri_spec.rb index a8e2925db1..49d3ea63f7 100644 --- a/Library/Homebrew/cask/spec/cask/underscore_supporting_uri_spec.rb +++ b/Library/Homebrew/cask/spec/cask/underscore_supporting_uri_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::UnderscoreSupportingURI do +describe Hbc::UnderscoreSupportingURI, :cask do describe "parse" do it "works like normal on normal URLs" do uri = Hbc::UnderscoreSupportingURI.parse("http://example.com/TestCask.dmg") diff --git a/Library/Homebrew/cask/spec/cask/url_checker_spec.rb b/Library/Homebrew/cask/spec/cask/url_checker_spec.rb index 8d2161586f..c505d2cb40 100644 --- a/Library/Homebrew/cask/spec/cask/url_checker_spec.rb +++ b/Library/Homebrew/cask/spec/cask/url_checker_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Hbc::UrlChecker do +describe Hbc::UrlChecker, :cask do describe "request processing" do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:checker) { Hbc::UrlChecker.new(cask) } diff --git a/Library/Homebrew/cask/spec/cask/verify_spec.rb b/Library/Homebrew/cask/spec/cask/verify_spec.rb index fc62b749cb..5d95fb3a29 100644 --- a/Library/Homebrew/cask/spec/cask/verify_spec.rb +++ b/Library/Homebrew/cask/spec/cask/verify_spec.rb @@ -1,4 +1,4 @@ -describe Hbc::Verify do +describe Hbc::Verify, :cask do let(:cask) { double("cask") } let(:verification_classes) {