From e1ea7bb721ec6d315058c0da285acd38cfc62b9f Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 5 Feb 2017 07:47:54 +0100 Subject: Refactor Cask `Artifact`s. --- Library/Homebrew/cask/test/cask/artifact/pkg_test.rb | 10 ---------- .../cask/test/cask/artifact/uninstall_test.rb | 20 ++------------------ Library/Homebrew/cask/test/cask/artifact/zap_test.rb | 20 ++------------------ 3 files changed, 4 insertions(+), 46 deletions(-) (limited to 'Library/Homebrew/cask/test') diff --git a/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb b/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb index a77fb0a07..b054290ce 100644 --- a/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/pkg_test.rb @@ -21,16 +21,6 @@ describe Hbc::Artifact::Pkg do end end - describe "uninstall_phase" do - it "does nothing, because the uninstall_phase method is a no-op" do - pkg = Hbc::Artifact::Pkg.new(@cask, - command: Hbc::FakeSystemCommand) - shutup do - pkg.uninstall_phase - end - end - end - describe "choices" do before do @cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-choices.rb") diff --git a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb index 3fb679196..464cad345 100644 --- a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb @@ -13,28 +13,12 @@ describe Hbc::Artifact::Uninstall do end end - describe "install_phase" do - it "does nothing, because the install_phase method is a no-op" do - shutup do - uninstall_artifact.install_phase - end - end - end - - describe "zap_phase" do - it "does nothing, because the zap_phase method is a no-op" do - shutup do - uninstall_artifact.zap_phase - end - end - end - describe "uninstall_phase" do - subject do + subject { shutup do uninstall_artifact.uninstall_phase end - end + } describe "when using launchctl" do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-launchctl.rb") } diff --git a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb index 0ebd9b304..ea546728b 100644 --- a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb +++ b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb @@ -14,28 +14,12 @@ describe Hbc::Artifact::Zap do end end - describe "install_phase" do - it "does nothing, because the install_phase method is a no-op" do - shutup do - zap_artifact.install_phase - end - end - end - describe "uninstall_phase" do - it "does nothing, because the uninstall_phase method is a no-op" do + subject { shutup do zap_artifact.uninstall_phase end - end - end - - describe "zap_phase" do - subject do - shutup do - zap_artifact.zap_phase - end - end + } describe "when using launchctl" do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-zap-launchctl.rb") } -- cgit v1.2.3