diff options
| author | Markus Reiter | 2017-03-13 01:01:17 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-03-16 12:10:19 +0100 |
| commit | d7af864be0e64c830a4c9944980bece19a60872d (patch) | |
| tree | 0b6e359fc99ba26767847c743f0ea4215239fb97 /Library/Homebrew/test/cask/cli | |
| parent | d1995dad4bf76b447d9c97f1c2db99c6b3854b51 (diff) | |
| download | brew-d7af864be0e64c830a4c9944980bece19a60872d.tar.bz2 | |
Replace `Hbc.path` with `CaskLoader.path`.
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
| -rw-r--r-- | Library/Homebrew/test/cask/cli/create_spec.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/edit_spec.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/style_spec.rb | 2 |
3 files changed, 9 insertions, 9 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 diff --git a/Library/Homebrew/test/cask/cli/edit_spec.rb b/Library/Homebrew/test/cask/cli/edit_spec.rb index 61970290b..f5f98afc8 100644 --- a/Library/Homebrew/test/cask/cli/edit_spec.rb +++ b/Library/Homebrew/test/cask/cli/edit_spec.rb @@ -25,14 +25,14 @@ describe Hbc::CLI::Edit, :cask do it "opens the editor for the specified Cask" do Hbc::CLI::Edit.run("local-caffeine") expect(Hbc::CLI::Edit.editor_commands).to eq [ - [Hbc.path("local-caffeine")], + [Hbc::CaskLoader.path("local-caffeine")], ] end it "throws away additional arguments and uses the first" do Hbc::CLI::Edit.run("local-caffeine", "local-transmission") expect(Hbc::CLI::Edit.editor_commands).to eq [ - [Hbc.path("local-caffeine")], + [Hbc::CaskLoader.path("local-caffeine")], ] end diff --git a/Library/Homebrew/test/cask/cli/style_spec.rb b/Library/Homebrew/test/cask/cli/style_spec.rb index 3f2ec91e2..ca17c5e46 100644 --- a/Library/Homebrew/test/cask/cli/style_spec.rb +++ b/Library/Homebrew/test/cask/cli/style_spec.rb @@ -130,7 +130,7 @@ describe Hbc::CLI::Style, :cask do end it "tries to find paths for all tokens" do - expect(Hbc).to receive(:path).twice + expect(Hbc::CaskLoader).to receive(:path).twice subject end end |
