aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli/install_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-10-07 15:58:49 +0200
committerMarkus Reiter2017-10-07 16:11:25 +0200
commit97333df4cb4bd006401193639400a8bc6df56e3a (patch)
treed04a2c243da0486c4e3248e74f392c6716c8bf88 /Library/Homebrew/test/cask/cli/install_spec.rb
parent113e5da55e630018cba9da19f4d3b268c2e7ee37 (diff)
downloadbrew-97333df4cb4bd006401193639400a8bc6df56e3a.tar.bz2
Add helper method for Cask fixture paths and refactor CaskLoader.
Diffstat (limited to 'Library/Homebrew/test/cask/cli/install_spec.rb')
-rw-r--r--Library/Homebrew/test/cask/cli/install_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/test/cask/cli/install_spec.rb b/Library/Homebrew/test/cask/cli/install_spec.rb
index 17a7b9f99..c918a3529 100644
--- a/Library/Homebrew/test/cask/cli/install_spec.rb
+++ b/Library/Homebrew/test/cask/cli/install_spec.rb
@@ -22,16 +22,16 @@ describe Hbc::CLI::Install, :cask do
it "allows staging and activation of multiple Casks at once" do
described_class.run("local-transmission", "local-caffeine")
- expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).to be_installed
+ expect(Hbc::CaskLoader.load(cask_path("local-transmission"))).to be_installed
expect(Hbc.appdir.join("Transmission.app")).to be_a_directory
- expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb")).to be_installed
+ expect(Hbc::CaskLoader.load(cask_path("local-caffeine"))).to be_installed
expect(Hbc.appdir.join("Caffeine.app")).to be_a_directory
end
it "skips double install (without nuking existing installation)" do
described_class.run("local-transmission")
described_class.run("local-transmission")
- expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).to be_installed
+ expect(Hbc::CaskLoader.load(cask_path("local-transmission"))).to be_installed
end
it "prints a warning message on double install" do
@@ -54,9 +54,9 @@ describe Hbc::CLI::Install, :cask do
it "skips dependencies with --skip-cask-deps" do
described_class.run("with-depends-on-cask-multiple", "--skip-cask-deps")
- expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-depends-on-cask-multiple.rb")).to be_installed
- expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb")).not_to be_installed
- expect(Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")).not_to be_installed
+ expect(Hbc::CaskLoader.load(cask_path("with-depends-on-cask-multiple"))).to be_installed
+ expect(Hbc::CaskLoader.load(cask_path("local-caffeine"))).not_to be_installed
+ expect(Hbc::CaskLoader.load(cask_path("local-transmission"))).not_to be_installed
end
it "properly handles Casks that are not present" do