aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb')
-rw-r--r--Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb b/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb
index cb2ef9850..bec8c2742 100644
--- a/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb
+++ b/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb
@@ -2,7 +2,7 @@ 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) {
- -> { Hbc::Artifact::Artifact.new(cask).install_phase }
+ -> { described_class.for_cask(cask).each { |artifact| artifact.install_phase(command: Hbc::NeverSudoSystemCommand, force: false) } }
}
let(:source_path) { cask.staged_path.join("Caffeine.app") }
@@ -12,11 +12,11 @@ describe Hbc::Artifact::Artifact, :cask do
InstallHelper.install_without_artifacts(cask)
end
- describe "with no target" do
- 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
- expect(install_phase).to raise_error(Hbc::CaskInvalidError)
+ context "without target" do
+ it "fails to load" do
+ expect {
+ Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-generic-artifact-no-target.rb")
+ }.to raise_error(Hbc::CaskInvalidError, /target required for Generic Artifact/)
end
end