Test casks are already tested covered brew style.

This commit is contained in:
Markus Reiter 2020-09-01 18:34:14 +02:00
parent 776faf651d
commit b9f3589ab7
2 changed files with 1 additions and 10 deletions

View File

@ -32,20 +32,13 @@ module Cask
def cask_paths
@cask_paths ||= if args.named.empty?
Tap.map(&:cask_dir).select(&:directory?).concat(test_cask_paths)
Tap.map(&:cask_dir).select(&:directory?)
elsif args.named.any? { |file| File.exist?(file) }
args.named.map { |path| Pathname(path).expand_path }
else
casks.map(&:sourcefile_path)
end
end
def test_cask_paths
[
Pathname.new("#{HOMEBREW_LIBRARY}/Homebrew/test/support/fixtures/cask/Casks"),
Pathname.new("#{HOMEBREW_LIBRARY}/Homebrew/test/support/fixtures/third-party/Casks"),
]
end
end
end
end

View File

@ -46,8 +46,6 @@ describe Cask::Cmd::Style, :cask do
expect(subject).to contain_exactly(
a_path_ending_with("/homebrew/homebrew-cask/Casks"),
a_path_ending_with("/third-party/homebrew-tap/Casks"),
a_path_ending_with("/Homebrew/test/support/fixtures/cask/Casks"),
a_path_ending_with("/Homebrew/test/support/fixtures/third-party/Casks"),
)
}
end