diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 708d6a3bcb..b161213060 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -794,6 +794,10 @@ class FormulaAuditor problem "Use the `#{method}` Ruby method instead of `system #{system}`" end + if line =~ /assert .*\.include?/ + problem "Use `assert_match` instead of `assert ...include?`" + end + if @strict if line =~ /system (["'][^"' ]*(?:\s[^"' ]*)+["'])/ bad_system = $1