aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli/outdated_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/outdated_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/outdated_spec.rb')
-rw-r--r--Library/Homebrew/test/cask/cli/outdated_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/test/cask/cli/outdated_spec.rb b/Library/Homebrew/test/cask/cli/outdated_spec.rb
index 7fca8c248..5bbf18d21 100644
--- a/Library/Homebrew/test/cask/cli/outdated_spec.rb
+++ b/Library/Homebrew/test/cask/cli/outdated_spec.rb
@@ -3,11 +3,11 @@ require_relative "shared_examples/invalid_option"
describe Hbc::CLI::Outdated, :cask do
let(:installed) do
[
- Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb"),
- Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/outdated/local-caffeine.rb"),
- Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/outdated/local-transmission.rb"),
- Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/version-latest-string.rb"),
- Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/outdated/auto-updates.rb"),
+ Hbc::CaskLoader.load(cask_path("basic-cask")),
+ Hbc::CaskLoader.load(cask_path("outdated/local-caffeine")),
+ Hbc::CaskLoader.load(cask_path("outdated/local-transmission")),
+ Hbc::CaskLoader.load(cask_path("version-latest-string")),
+ Hbc::CaskLoader.load(cask_path("outdated/auto-updates")),
]
end
@@ -74,7 +74,7 @@ describe Hbc::CLI::Outdated, :cask do
end
it 'does not include the Casks with "auto_updates true" when the version did not change' do
- cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/auto-updates.rb")
+ cask = Hbc::CaskLoader.load(cask_path("auto-updates"))
InstallHelper.install_with_caskfile(cask)
expect {