aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli/create_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-03-16 22:58:21 +0100
committerGitHub2017-03-16 22:58:21 +0100
commitbfb5bf1d7007821c74de4252fe1ade5047e0ca3c (patch)
treefc9991edb93017eaab5fe4b26f781a45ad909b77 /Library/Homebrew/test/cask/cli/create_spec.rb
parentc4d8b1696c90fa54f0e2f4bce3c734f7a657662b (diff)
parented10135da4fbabca2798afe949b6f5af9544ec9f (diff)
downloadbrew-bfb5bf1d7007821c74de4252fe1ade5047e0ca3c.tar.bz2
Merge pull request #2325 from reitermarkus/better-cask-loading
Use a `Formulary`-like approach to load Casks.
Diffstat (limited to 'Library/Homebrew/test/cask/cli/create_spec.rb')
-rw-r--r--Library/Homebrew/test/cask/cli/create_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/test/cask/cli/create_spec.rb b/Library/Homebrew/test/cask/cli/create_spec.rb
index 21eaeb656..b1cee6990 100644
--- a/Library/Homebrew/test/cask/cli/create_spec.rb
+++ b/Library/Homebrew/test/cask/cli/create_spec.rb
@@ -24,7 +24,7 @@ describe Hbc::CLI::Create, :cask do
after(:each) do
%w[new-cask additional-cask another-cask yet-another-cask local-caff].each do |cask|
- path = Hbc.path(cask)
+ path = Hbc::CaskLoader.path(cask)
path.delete if path.exist?
end
end
@@ -32,13 +32,13 @@ describe Hbc::CLI::Create, :cask do
it "opens the editor for the specified Cask" do
Hbc::CLI::Create.run("new-cask")
expect(Hbc::CLI::Create.editor_commands).to eq [
- [Hbc.path("new-cask")],
+ [Hbc::CaskLoader.path("new-cask")],
]
end
it "drops a template down for the specified Cask" do
Hbc::CLI::Create.run("new-cask")
- template = File.read(Hbc.path("new-cask"))
+ template = File.read(Hbc::CaskLoader.path("new-cask"))
expect(template).to eq <<-EOS.undent
cask 'new-cask' do
version ''
@@ -56,14 +56,14 @@ describe Hbc::CLI::Create, :cask do
it "throws away additional Cask arguments and uses the first" do
Hbc::CLI::Create.run("additional-cask", "another-cask")
expect(Hbc::CLI::Create.editor_commands).to eq [
- [Hbc.path("additional-cask")],
+ [Hbc::CaskLoader.path("additional-cask")],
]
end
it "throws away stray options" do
Hbc::CLI::Create.run("--notavalidoption", "yet-another-cask")
expect(Hbc::CLI::Create.editor_commands).to eq [
- [Hbc.path("yet-another-cask")],
+ [Hbc::CaskLoader.path("yet-another-cask")],
]
end
@@ -76,7 +76,7 @@ describe Hbc::CLI::Create, :cask do
it "allows creating Casks that are substrings of existing Casks" do
Hbc::CLI::Create.run("local-caff")
expect(Hbc::CLI::Create.editor_commands).to eq [
- [Hbc.path("local-caff")],
+ [Hbc::CaskLoader.path("local-caff")],
]
end