From bd2f5c3b320dec0af48b51bc8bc126f25098d008 Mon Sep 17 00:00:00 2001 From: William Ma Date: Mon, 22 Jun 2020 11:42:15 -0400 Subject: [PATCH] test cache: split regex into multiple lines --- Library/Homebrew/test/cmd/--cache_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/cmd/--cache_spec.rb b/Library/Homebrew/test/cmd/--cache_spec.rb index fc467f5793..14397bbfb0 100644 --- a/Library/Homebrew/test/cmd/--cache_spec.rb +++ b/Library/Homebrew/test/cmd/--cache_spec.rb @@ -23,7 +23,12 @@ describe "brew --cache", :integration_test do it "prints the cache files for a given Formula and Cask" do expect { brew "--cache", testball, cask_path("local-caffeine") } - .to output(%r{#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-.*\ncask: #{HOMEBREW_CACHE}/downloads/[\da-f]{64}--caffeine\.zip}).to_stdout + .to output( + %r{ + #{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-.*\n + cask:\s#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--caffeine\.zip + }x, + ).to_stdout .and not_to_output.to_stderr .and be_a_success end