diff options
| author | L. E. Segovia | 2017-11-28 00:29:45 +0000 | 
|---|---|---|
| committer | L. E. Segovia | 2017-11-28 00:29:45 +0000 | 
| commit | 10a0662dc013d7fd6949dce0a1bb75a1ec2bf91a (patch) | |
| tree | bcdeb38d6ef03e69b256e2498f7942b13572dcca /Library/Homebrew/test/cask/cli | |
| parent | f50ae449800c85b53910bf294b9271c45c25da01 (diff) | |
| download | brew-10a0662dc013d7fd6949dce0a1bb75a1ec2bf91a.tar.bz2 | |
Test upgrade for Casks with version :latest
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
| -rw-r--r-- | Library/Homebrew/test/cask/cli/upgrade_spec.rb | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cask/cli/upgrade_spec.rb b/Library/Homebrew/test/cask/cli/upgrade_spec.rb index 5f389d695..49775156e 100644 --- a/Library/Homebrew/test/cask/cli/upgrade_spec.rb +++ b/Library/Homebrew/test/cask/cli/upgrade_spec.rb @@ -9,6 +9,7 @@ describe Hbc::CLI::Upgrade, :cask do          "outdated/local-caffeine",          "outdated/local-transmission",          "outdated/auto-updates", +        "outdated/version-latest",        ]      } @@ -103,6 +104,9 @@ describe Hbc::CLI::Upgrade, :cask do          auto_updates_path = Hbc.appdir.join("MyFancyApp.app")          local_transmission = Hbc::CaskLoader.load("local-transmission")          local_transmission_path = Hbc.appdir.join("Transmission.app") +        version_latest = Hbc::CaskLoader.load("version-latest") +        version_latest_path_1 = Hbc.appdir.join("Caffeine Mini.app") +        version_latest_path_2 = Hbc.appdir.join("Caffeine Pro.app")          expect(local_caffeine).to be_installed          expect(local_caffeine_path).to be_a_directory @@ -116,6 +120,11 @@ describe Hbc::CLI::Upgrade, :cask do          expect(local_transmission_path).to be_a_directory          expect(local_transmission.versions).to include("2.60") +        expect(version_latest).to be_installed +        expect(version_latest_path_1).to be_a_directory +        expect(version_latest_path_2).to be_a_directory +        expect(version_latest.versions).to include("latest") +          described_class.run("--greedy")          expect(local_caffeine).to be_installed @@ -129,6 +138,11 @@ describe Hbc::CLI::Upgrade, :cask do          expect(local_transmission).to be_installed          expect(local_transmission_path).to be_a_directory          expect(local_transmission.versions).to include("2.61") + +        expect(version_latest).to be_installed +        expect(version_latest_path_1).to be_a_directory +        expect(version_latest_path_2).to be_a_directory +        expect(version_latest.versions).to include("latest")        end        it 'does not include the Casks with "auto_updates true" when the version did not change' do  | 
