Merge pull request #1353 from reitermarkus/fix-linked-caskroom-tap

Use proper path to `caskroom/cask` tap in `test_helper`.
This commit is contained in:
Markus Reiter 2016-10-23 19:34:50 +02:00 committed by GitHub
commit 0c140f0970
2 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ describe Hbc::CLI::Create do
end end
after do after do
%w[new-cask additional-cask another-cask yet-another-cask feine].each do |cask| %w[new-cask additional-cask another-cask yet-another-cask local-caff].each do |cask|
path = Hbc.path(cask) path = Hbc.path(cask)
path.delete if path.exist? path.delete if path.exist?
end end
@ -71,14 +71,14 @@ describe Hbc::CLI::Create do
it "raises an exception when the Cask already exists" do it "raises an exception when the Cask already exists" do
lambda { lambda {
Hbc::CLI::Create.run("caffeine") Hbc::CLI::Create.run("basic-cask")
}.must_raise Hbc::CaskAlreadyCreatedError }.must_raise Hbc::CaskAlreadyCreatedError
end end
it "allows creating Casks that are substrings of existing Casks" do it "allows creating Casks that are substrings of existing Casks" do
Hbc::CLI::Create.run("feine") Hbc::CLI::Create.run("local-caff")
Hbc::CLI::Create.editor_commands.must_equal [ Hbc::CLI::Create.editor_commands.must_equal [
[Hbc.path("feine")], [Hbc.path("local-caff")],
] ]
end end

View File

@ -50,7 +50,7 @@ Hbc.default_tap = Tap.fetch("caskroom", "test").tap do |tap|
end end
# pretend that the caskroom/cask Tap is installed # pretend that the caskroom/cask Tap is installed
FileUtils.ln_s HOMEBREW_LIBRARY.join("Taps", "caskroom", "homebrew-cask"), Tap.fetch("caskroom", "cask").path FileUtils.ln_s Pathname.new(ENV["HOMEBREW_LIBRARY"]).join("Taps", "caskroom", "homebrew-cask"), Tap.fetch("caskroom", "cask").path
class TestHelper class TestHelper
# helpers for test Casks to reference local files easily # helpers for test Casks to reference local files easily