diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index afc279c710..7b7d251697 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -795,7 +795,7 @@ class FormulaAuditor problem "Use the `#{method}` Ruby method instead of `system #{system}`" end - if line =~ /assert .*\.include?/ + if line =~ /assert [^!]+\.include?/ problem "Use `assert_match` instead of `assert ...include?`" end