diff --git a/Library/Homebrew/test/cask/cmd/uninstall_spec.rb b/Library/Homebrew/test/cask/cmd/uninstall_spec.rb index 3b7868d189..80578667e7 100644 --- a/Library/Homebrew/test/cask/cmd/uninstall_spec.rb +++ b/Library/Homebrew/test/cask/cmd/uninstall_spec.rb @@ -53,22 +53,6 @@ describe Cask::Cmd::Uninstall, :cask do expect(transmission.config.appdir.join("Caffeine.app")).not_to exist end - it "calls `uninstall` before removing artifacts" do - cask = Cask::CaskLoader.load(cask_path("with-uninstall-script-app")) - - Cask::Installer.new(cask).install - - expect(cask).to be_installed - expect(cask.config.appdir.join("MyFancyApp.app")).to exist - - expect { - described_class.run("with-uninstall-script-app") - }.not_to raise_error - - expect(cask).not_to be_installed - expect(cask.config.appdir.join("MyFancyApp.app")).not_to exist - end - it "can uninstall Casks when the uninstall script is missing, but only when using `--force`" do cask = Cask::CaskLoader.load(cask_path("with-uninstall-script-app")) @@ -90,30 +74,6 @@ describe Cask::Cmd::Uninstall, :cask do expect(cask).not_to be_installed end - context "when Casks use script path with `~` as `HOME`" do - let(:home_dir) { mktmpdir } - let(:app) { Pathname.new("#{home_dir}/MyFancyApp.app") } - let(:cask) { Cask::CaskLoader.load(cask_path("with-uninstall-script-user-relative")) } - - before do - ENV["HOME"] = home_dir - end - - it "can still uninstall them" do - Cask::Installer.new(cask).install - - expect(cask).to be_installed - expect(app).to exist - - expect { - described_class.run("with-uninstall-script-user-relative") - }.not_to raise_error - - expect(cask).not_to be_installed - expect(app).not_to exist - end - end - describe "when multiple versions of a cask are installed" do let(:token) { "versioned-cask" } let(:first_installed_version) { "1.2.3" }