diff options
Diffstat (limited to 'Library/Homebrew/test/cask')
17 files changed, 48 insertions, 48 deletions
diff --git a/Library/Homebrew/test/cask/artifact/app_spec.rb b/Library/Homebrew/test/cask/artifact/app_spec.rb index 4ead8b7f9..285cc4f31 100644 --- a/Library/Homebrew/test/cask/artifact/app_spec.rb +++ b/Library/Homebrew/test/cask/artifact/app_spec.rb @@ -82,12 +82,12 @@ describe Hbc::Artifact::App, :cask do          describe "target is both writable and user-owned" do            it "overwrites the existing app" do -            stdout = <<-EOS.undent +            stdout = <<~EOS                ==> Removing App '#{target_path}'.                ==> Moving App 'Caffeine.app' to '#{target_path}'.              EOS -            stderr = <<-EOS.undent +            stderr = <<~EOS                Warning: It seems there is already an App at '#{target_path}'; overwriting.              EOS @@ -117,12 +117,12 @@ describe Hbc::Artifact::App, :cask do              expect(command).to receive(:run).with("/usr/bin/chflags", args: ["-R", "--", "000", target_path], must_succeed: false)                .and_call_original -            stdout = <<-EOS.undent +            stdout = <<~EOS                ==> Removing App '#{target_path}'.                ==> Moving App 'Caffeine.app' to '#{target_path}'.              EOS -            stderr = <<-EOS.undent +            stderr = <<~EOS                Warning: It seems there is already an App at '#{target_path}'; overwriting.              EOS @@ -162,12 +162,12 @@ describe Hbc::Artifact::App, :cask do          let(:force) { true }          it "overwrites the existing app" do -          stdout = <<-EOS.undent +          stdout = <<~EOS              ==> Removing App '#{target_path}'.              ==> Moving App 'Caffeine.app' to '#{target_path}'.            EOS -          stderr = <<-EOS.undent +          stderr = <<~EOS              Warning: It seems there is already an App at '#{target_path}'; overwriting.            EOS diff --git a/Library/Homebrew/test/cask/artifact/pkg_spec.rb b/Library/Homebrew/test/cask/artifact/pkg_spec.rb index 7f1b64d1a..89916d283 100644 --- a/Library/Homebrew/test/cask/artifact/pkg_spec.rb +++ b/Library/Homebrew/test/cask/artifact/pkg_spec.rb @@ -29,7 +29,7 @@ describe Hbc::Artifact::Pkg, :cask do        file = double(path: Pathname.new("/tmp/choices.xml")) -      expect(file).to receive(:write).with(<<-EOS.undent) +      expect(file).to receive(:write).with(<<~EOS)          <?xml version="1.0" encoding="UTF-8"?>          <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">          <plist version="1.0"> diff --git a/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb b/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb index 7f2ef75b3..8367dc27d 100644 --- a/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb +++ b/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb @@ -61,7 +61,7 @@ describe Hbc::Artifact::App, :cask do          target_path_mini.mkpath          expect { -          expect(install_phase).to output(<<-EOS.undent).to_stdout +          expect(install_phase).to output(<<~EOS).to_stdout              ==> Moving App 'Caffeine Pro.app' to '#{target_path_pro}'            EOS          }.to raise_error(Hbc::CaskError, "It seems there is already an App at '#{target_path_mini}'.") @@ -75,7 +75,7 @@ describe Hbc::Artifact::App, :cask do          target_path_pro.mkpath          expect { -          expect(install_phase).to output(<<-EOS.undent).to_stdout +          expect(install_phase).to output(<<~EOS).to_stdout              ==> Moving App 'Caffeine Mini.app' to '#{target_path_mini}'            EOS          }.to raise_error(Hbc::CaskError, "It seems there is already an App at '#{target_path_pro}'.") diff --git a/Library/Homebrew/test/cask/artifact/uninstall_zap_shared_examples.rb b/Library/Homebrew/test/cask/artifact/uninstall_zap_shared_examples.rb index b9872ab9e..7edfb9e1c 100644 --- a/Library/Homebrew/test/cask/artifact/uninstall_zap_shared_examples.rb +++ b/Library/Homebrew/test/cask/artifact/uninstall_zap_shared_examples.rb @@ -11,7 +11,7 @@ shared_examples "#uninstall_phase or #zap_phase" do      let(:launchctl_remove_cmd) { %w[/bin/launchctl remove my.fancy.package.service] }      let(:unknown_response) { "launchctl list returned unknown response\n" }      let(:service_info) do -      <<-EOS.undent +      <<~EOS          {                  "LimitLoadToSessionType" = "Aqua";                  "Label" = "my.fancy.package.service"; 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 diff --git a/Library/Homebrew/test/cask/dsl_spec.rb b/Library/Homebrew/test/cask/dsl_spec.rb index 28cf6f4b2..a17acfca6 100644 --- a/Library/Homebrew/test/cask/dsl_spec.rb +++ b/Library/Homebrew/test/cask/dsl_spec.rb @@ -20,7 +20,7 @@ describe Hbc::DSL, :cask do      }      it "prints a warning that it has encountered an unexpected method" do -      expected = Regexp.compile(<<-EOS.undent.lines.map(&:chomp).join("")) +      expected = Regexp.compile(<<~EOS.lines.map(&:chomp).join(""))          (?m)          Warning:          .* @@ -232,7 +232,7 @@ describe Hbc::DSL, :cask do        expect(cask.caveats).to be_empty        cask = Hbc::Cask.new("cask-with-caveats") do -        def caveats; <<-EOS.undent +        def caveats; <<~EOS            When you install this Cask, you probably want to know this.            EOS          end diff --git a/Library/Homebrew/test/cask/pkg_spec.rb b/Library/Homebrew/test/cask/pkg_spec.rb index 07443e76e..f92d6854e 100644 --- a/Library/Homebrew/test/cask/pkg_spec.rb +++ b/Library/Homebrew/test/cask/pkg_spec.rb @@ -123,7 +123,7 @@ describe Hbc::Pkg, :cask do      end      let(:pkg_info_plist) do -      <<-EOS.undent +      <<~EOS          <?xml version="1.0" encoding="UTF-8"?>          <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">          <plist version="1.0"> diff --git a/Library/Homebrew/test/cask/system_command_result_spec.rb b/Library/Homebrew/test/cask/system_command_result_spec.rb index 4a077de7b..d09f1220c 100644 --- a/Library/Homebrew/test/cask/system_command_result_spec.rb +++ b/Library/Homebrew/test/cask/system_command_result_spec.rb @@ -5,7 +5,7 @@ describe Hbc::SystemCommand::Result, :cask do      subject { described_class._parse_plist(command, input) }      let(:command) { Hbc::SystemCommand.new("/usr/bin/true", {}) }      let(:plist) { -      <<-EOS.undent +      <<~EOS          <?xml version="1.0" encoding="UTF-8"?>          <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">          <plist version="1.0"> @@ -54,7 +54,7 @@ describe Hbc::SystemCommand::Result, :cask do      context "when output contains garbage" do        let(:input) { -        <<-EOS.undent +        <<~EOS            Hello there! I am in no way XML am I?!?!              That's a little silly... you were expexting XML here!  | 
