diff options
| author | Mike McQuaid | 2017-04-05 08:37:43 +0100 |
|---|---|---|
| committer | GitHub | 2017-04-05 08:37:43 +0100 |
| commit | 3f5140621223780f03fd37c0c3ba3b883eb318ba (patch) | |
| tree | 333d1de82180ebe1b773edbe4741642517ce634f /Library/Homebrew/test/dev-cmd | |
| parent | dbc9cd7aa37f3215efa834345445fc0af4df33e2 (diff) | |
| parent | a693ca332efcc56e0d7dbb3f43952226225ccf75 (diff) | |
| download | brew-3f5140621223780f03fd37c0c3ba3b883eb318ba.tar.bz2 | |
Merge pull request #2242 from GauthamGoli/audit_custom_cops
Port audit_desc audit rules to a cop
Diffstat (limited to 'Library/Homebrew/test/dev-cmd')
| -rw-r--r-- | Library/Homebrew/test/dev-cmd/audit_spec.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index ec1a34fb4..a6bb22837 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -344,10 +344,6 @@ describe FormulaAuditor do end EOS - fa.audit_desc - expect(fa.problems.shift) - .to eq("Description shouldn't include the formula name") - fa.audit_line 'ohai "#{share}/foolibc++"', 3 expect(fa.problems.shift) .to eq("Use \#{pkgshare} instead of \#{share}/foolibc++") @@ -413,32 +409,6 @@ describe FormulaAuditor do .to eq(["Don't recommend setuid in the caveats, suggest sudo instead."]) end - specify "#audit_desc" do - formula_descriptions = [ - { name: "foo", desc: nil, - problem: "Formula should have a desc" }, - { name: "bar", desc: "bar" * 30, - problem: "Description is too long" }, - { name: "baz", desc: "Baz commandline tool", - problem: "Description should use \"command-line\"" }, - { name: "qux", desc: "A tool called Qux", - problem: "Description shouldn't start with an indefinite article" }, - ] - - formula_descriptions.each do |formula| - content = <<-EOS.undent - class #{Formulary.class_s(formula[:name])} < Formula - url "http://example.com/#{formula[:name]}-1.0.tgz" - desc "#{formula[:desc]}" - end - EOS - - fa = formula_auditor formula[:name], content, strict: true - fa.audit_desc - expect(fa.problems.first).to match(formula[:problem]) - end - end - describe "#audit_homepage" do specify "homepage URLs" do fa = formula_auditor "foo", <<-EOS.undent, online: true |
