diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb
index 920ab6f468c8ad7b94913100ff0bd8ffa1605f03..78819a5c647dc04d8ead62600abea5845ed9892a 100644
--- a/Library/Homebrew/test/test_integration_cmds.rb
+++ b/Library/Homebrew/test/test_integration_cmds.rb
@@ -694,7 +694,9 @@ class IntegrationCommandTests < Homebrew::TestCase
     assert (share/"notpruneable").directory?
     refute (share/"pruneable_symlink").symlink?
 
-    assert_equal "Nothing pruned",
+    # Inexact match because only if ~/Applications exists, will this output one
+    # more line with contents `No apps unlinked from /Users/<user/Applications`.
+    assert_match "Nothing pruned\nNo apps unlinked from /Applications",
       cmd("prune", "--verbose")
   ensure
     share.rmtree