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