diff options
| author | Markus Reiter | 2017-10-07 15:58:49 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-10-07 16:11:25 +0200 |
| commit | 97333df4cb4bd006401193639400a8bc6df56e3a (patch) | |
| tree | d04a2c243da0486c4e3248e74f392c6716c8bf88 /Library/Homebrew/test/cask/cli/install_spec.rb | |
| parent | 113e5da55e630018cba9da19f4d3b268c2e7ee37 (diff) | |
| download | brew-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.rb | 12 |
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 |
