diff options
| author | Markus Reiter | 2017-10-15 02:28:32 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-10-18 14:39:09 +0200 |
| commit | 9bee9ca5757d1c5f720787737fed6a534a620d72 (patch) | |
| tree | b1eed297d9eb169673d2ed308e5ef3ca3bb09d12 /Library/Homebrew/test/cask/cli | |
| parent | 270b752f5d9d218bfbed6fe85b6974fa653fb25f (diff) | |
| download | brew-9bee9ca5757d1c5f720787737fed6a534a620d72.tar.bz2 | |
Use “squiggly” heredocs.
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
| -rw-r--r-- | Library/Homebrew/test/cask/cli/cat_spec.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/cleanup_spec.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/create_spec.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/info_spec.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/install_spec.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/list_spec.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/outdated_spec.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/reinstall_spec.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/search_spec.rb | 14 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/uninstall_spec.rb | 6 |
10 files changed, 33 insertions, 33 deletions
diff --git a/Library/Homebrew/test/cask/cli/cat_spec.rb b/Library/Homebrew/test/cask/cli/cat_spec.rb index 6b54a2e4b..e1db1b17d 100644 --- a/Library/Homebrew/test/cask/cli/cat_spec.rb +++ b/Library/Homebrew/test/cask/cli/cat_spec.rb @@ -7,7 +7,7 @@ describe Hbc::CLI::Cat, :cask do describe "given a basic Cask" do let(:basic_cask_content) { - <<-EOS.undent + <<~EOS cask 'basic-cask' do version '1.2.3' sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' diff --git a/Library/Homebrew/test/cask/cli/cleanup_spec.rb b/Library/Homebrew/test/cask/cli/cleanup_spec.rb index 7cf00352d..cbef71be8 100644 --- a/Library/Homebrew/test/cask/cli/cleanup_spec.rb +++ b/Library/Homebrew/test/cask/cli/cleanup_spec.rb @@ -32,7 +32,7 @@ describe Hbc::CLI::Cleanup, :cask do expect { subject.run - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout ==> Removing cached downloads for #{cask_token} #{cached_downloads[0]} ==> This operation has freed approximately #{disk_usage_readable(cleanup_size)} of disk space. @@ -52,7 +52,7 @@ describe Hbc::CLI::Cleanup, :cask do expect { subject.run - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout ==> Removing cached downloads #{cached_download} ==> This operation has freed approximately #{disk_usage_readable(cleanup_size)} of disk space. @@ -70,7 +70,7 @@ describe Hbc::CLI::Cleanup, :cask do expect { subject.run - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout ==> Removing cached downloads older than 10 days old Nothing to do EOS diff --git a/Library/Homebrew/test/cask/cli/create_spec.rb b/Library/Homebrew/test/cask/cli/create_spec.rb index 60c03db75..1b15ecd40 100644 --- a/Library/Homebrew/test/cask/cli/create_spec.rb +++ b/Library/Homebrew/test/cask/cli/create_spec.rb @@ -28,7 +28,7 @@ describe Hbc::CLI::Create, :cask do it "drops a template down for the specified Cask" do described_class.run("new-cask") template = File.read(Hbc::CaskLoader.path("new-cask")) - expect(template).to eq <<-EOS.undent + expect(template).to eq <<~EOS cask 'new-cask' do version '' sha256 '' diff --git a/Library/Homebrew/test/cask/cli/info_spec.rb b/Library/Homebrew/test/cask/cli/info_spec.rb index e24eead11..0fc751e06 100644 --- a/Library/Homebrew/test/cask/cli/info_spec.rb +++ b/Library/Homebrew/test/cask/cli/info_spec.rb @@ -8,7 +8,7 @@ describe Hbc::CLI::Info, :cask do it "displays some nice info about the specified Cask" do expect { described_class.run("local-caffeine") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine: 1.2.3 http://example.com/local-caffeine Not installed @@ -22,7 +22,7 @@ describe Hbc::CLI::Info, :cask do describe "given multiple Casks" do let(:expected_output) { - <<-EOS.undent + <<~EOS local-caffeine: 1.2.3 http://example.com/local-caffeine Not installed @@ -52,7 +52,7 @@ describe Hbc::CLI::Info, :cask do it "should print caveats if the Cask provided one" do expect { described_class.run("with-caveats") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout with-caveats: 1.2.3 http://example.com/local-caffeine Not installed @@ -78,7 +78,7 @@ describe Hbc::CLI::Info, :cask do it 'should not print "Caveats" section divider if the caveats block has no output' do expect { described_class.run("with-conditional-caveats") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout with-conditional-caveats: 1.2.3 http://example.com/local-caffeine Not installed @@ -93,7 +93,7 @@ describe Hbc::CLI::Info, :cask do it "prints languages specified in the Cask" do expect { described_class.run("with-languages") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout with-languages: 1.2.3 http://example.com/local-caffeine Not installed @@ -110,7 +110,7 @@ describe Hbc::CLI::Info, :cask do it 'does not print "Languages" section divider if the languages block has no output' do expect { described_class.run("without-languages") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout without-languages: 1.2.3 http://example.com/local-caffeine Not installed diff --git a/Library/Homebrew/test/cask/cli/install_spec.rb b/Library/Homebrew/test/cask/cli/install_spec.rb index c918a3529..25d6cdc93 100644 --- a/Library/Homebrew/test/cask/cli/install_spec.rb +++ b/Library/Homebrew/test/cask/cli/install_spec.rb @@ -6,7 +6,7 @@ describe Hbc::CLI::Install, :cask do it_behaves_like "a command that handles invalid options" it "displays the installation progress" do - output = Regexp.new <<-EOS.undent + output = Regexp.new <<~EOS ==> Downloading file:.*caffeine.zip ==> Verifying checksum for Cask local-caffeine ==> Installing Cask local-caffeine diff --git a/Library/Homebrew/test/cask/cli/list_spec.rb b/Library/Homebrew/test/cask/cli/list_spec.rb index 301ca9b89..eef233acc 100644 --- a/Library/Homebrew/test/cask/cli/list_spec.rb +++ b/Library/Homebrew/test/cask/cli/list_spec.rb @@ -12,7 +12,7 @@ describe Hbc::CLI::List, :cask do expect { described_class.run - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine local-transmission EOS @@ -31,7 +31,7 @@ describe Hbc::CLI::List, :cask do expect { described_class.run("--full-name") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine local-transmission third-party/tap/third-party-cask @@ -41,7 +41,7 @@ describe Hbc::CLI::List, :cask do describe "lists versions" do let(:casks) { ["local-caffeine", "local-transmission"] } let(:expected_output) { - <<-EOS.undent + <<~EOS local-caffeine 1.2.3 local-transmission 2.61 EOS @@ -78,7 +78,7 @@ describe Hbc::CLI::List, :cask do expect { described_class.run("local-transmission", "local-caffeine") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout ==> Apps #{Hbc.appdir.join("Transmission.app")} (#{Hbc.appdir.join("Transmission.app").abv}) ==> Apps diff --git a/Library/Homebrew/test/cask/cli/outdated_spec.rb b/Library/Homebrew/test/cask/cli/outdated_spec.rb index 5bbf18d21..1ee6a6d7d 100644 --- a/Library/Homebrew/test/cask/cli/outdated_spec.rb +++ b/Library/Homebrew/test/cask/cli/outdated_spec.rb @@ -23,7 +23,7 @@ describe Hbc::CLI::Outdated, :cask do it "checks all the installed Casks when no token is provided" do expect { described_class.run - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine (1.2.2) != 1.2.3 local-transmission (2.60) != 2.61 EOS @@ -32,7 +32,7 @@ describe Hbc::CLI::Outdated, :cask do it "checks only the tokens specified in the command line" do expect { described_class.run("local-caffeine") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine (1.2.2) != 1.2.3 EOS end @@ -40,7 +40,7 @@ describe Hbc::CLI::Outdated, :cask do it 'ignores "auto_updates" and "latest" Casks even when their tokens are provided in the command line' do expect { described_class.run("local-caffeine", "auto-updates", "version-latest-string") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine (1.2.2) != 1.2.3 EOS end @@ -54,7 +54,7 @@ describe Hbc::CLI::Outdated, :cask do it "lists only the names (no versions) of the outdated Casks with --quiet" do expect { described_class.run("--verbose", "--quiet") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine local-transmission EOS @@ -65,7 +65,7 @@ describe Hbc::CLI::Outdated, :cask do it 'includes the Casks with "auto_updates true" or "version latest" with --greedy' do expect { described_class.run("--greedy") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout auto-updates (2.57) != 2.61 local-caffeine (1.2.2) != 1.2.3 local-transmission (2.60) != 2.61 @@ -79,7 +79,7 @@ describe Hbc::CLI::Outdated, :cask do expect { described_class.run("--greedy") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine (1.2.2) != 1.2.3 local-transmission (2.60) != 2.61 version-latest-string (latest) != latest diff --git a/Library/Homebrew/test/cask/cli/reinstall_spec.rb b/Library/Homebrew/test/cask/cli/reinstall_spec.rb index 95294b695..5e551e5b5 100644 --- a/Library/Homebrew/test/cask/cli/reinstall_spec.rb +++ b/Library/Homebrew/test/cask/cli/reinstall_spec.rb @@ -8,7 +8,7 @@ describe Hbc::CLI::Reinstall, :cask do Hbc::Installer.new(caffeine).install - output = Regexp.new <<-EOS.undent + output = Regexp.new <<~EOS ==> Downloading file:.*caffeine.zip Already downloaded: .*local-caffeine--1.2.3.zip ==> Verifying checksum for Cask local-caffeine diff --git a/Library/Homebrew/test/cask/cli/search_spec.rb b/Library/Homebrew/test/cask/cli/search_spec.rb index a4f796f3c..cd1a7bd43 100644 --- a/Library/Homebrew/test/cask/cli/search_spec.rb +++ b/Library/Homebrew/test/cask/cli/search_spec.rb @@ -12,7 +12,7 @@ describe Hbc::CLI::Search, :cask do expect { Hbc::CLI::Search.run("local") - }.to output(<<-EOS.undent).to_stdout.as_tty + }.to output(<<~EOS).to_stdout.as_tty ==> Partial Matches local-caffeine local-transmission @@ -24,7 +24,7 @@ describe Hbc::CLI::Search, :cask do expect { Hbc::CLI::Search.run("local") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine local-transmission EOS @@ -35,7 +35,7 @@ describe Hbc::CLI::Search, :cask do expect { Hbc::CLI::Search.run("local") - }.to output(<<-EOS.undent).to_stdout + }.to output(<<~EOS).to_stdout local-caffeine local-transmission EOS @@ -45,7 +45,7 @@ describe Hbc::CLI::Search, :cask do it "shows that there are no Casks matching a search term that did not result in anything" do expect { Hbc::CLI::Search.run("foo-bar-baz") - }.to output(<<-EOS.undent).to_stdout.as_tty + }.to output(<<~EOS).to_stdout.as_tty No Cask found for "foo-bar-baz". EOS end @@ -84,7 +84,7 @@ describe Hbc::CLI::Search, :cask do it "accepts a regexp argument" do expect { Hbc::CLI::Search.run("/^local-c[a-z]ffeine$/") - }.to output(<<-EOS.undent).to_stdout.as_tty + }.to output(<<~EOS).to_stdout.as_tty ==> Regexp Matches local-caffeine EOS @@ -93,7 +93,7 @@ describe Hbc::CLI::Search, :cask do it "returns both exact and partial matches" do expect { Hbc::CLI::Search.run("test-opera") - }.to output(<<-EOS.undent).to_stdout.as_tty + }.to output(<<~EOS).to_stdout.as_tty ==> Exact Match test-opera ==> Partial Matches @@ -104,7 +104,7 @@ describe Hbc::CLI::Search, :cask do it "does not search the Tap name" do expect { Hbc::CLI::Search.run("caskroom") - }.to output(<<-EOS.undent).to_stdout.as_tty + }.to output(<<~EOS).to_stdout.as_tty No Cask found for "caskroom". EOS end diff --git a/Library/Homebrew/test/cask/cli/uninstall_spec.rb b/Library/Homebrew/test/cask/cli/uninstall_spec.rb index 80b7edbd3..1ab8f7e4d 100644 --- a/Library/Homebrew/test/cask/cli/uninstall_spec.rb +++ b/Library/Homebrew/test/cask/cli/uninstall_spec.rb @@ -10,7 +10,7 @@ describe Hbc::CLI::Uninstall, :cask do Hbc::Installer.new(caffeine).install - output = Regexp.new <<-EOS.undent + output = Regexp.new <<~EOS ==> Uninstalling Cask local-caffeine ==> Removing App '.*Caffeine.app'. EOS @@ -107,7 +107,7 @@ describe Hbc::CLI::Uninstall, :cask do timestamped_versions.each do |timestamped_version| caskroom_path.join(".metadata", *timestamped_version, "Casks").tap(&:mkpath) .join("#{token}.rb").open("w") do |caskfile| - caskfile.puts <<-EOS.undent + caskfile.puts <<~EOS cask '#{token}' do version '#{timestamped_version[0]}' end @@ -153,7 +153,7 @@ describe Hbc::CLI::Uninstall, :cask do saved_caskfile.dirname.mkpath - IO.write saved_caskfile, <<-EOS.undent + IO.write saved_caskfile, <<~EOS cask 'ive-been-renamed' do version :latest |
