From 97333df4cb4bd006401193639400a8bc6df56e3a Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 7 Oct 2017 15:58:49 +0200 Subject: Add helper method for Cask fixture paths and refactor CaskLoader. --- Library/Homebrew/test/cask/cli/outdated_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/test/cask/cli/outdated_spec.rb') 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 { -- cgit v1.2.3