aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/dev-cmd/audit_spec.rb
diff options
context:
space:
mode:
authorGautham Goli2017-03-02 01:10:36 +0530
committerGautham Goli2017-03-02 12:50:05 +0530
commit19f693d25ba514a6b604128474763e83de55b548 (patch)
treef0b8620e7539ee2a90d47f5d14204e5196c17b2a /Library/Homebrew/test/dev-cmd/audit_spec.rb
parente022239608ca535fa3b56305eff8dd091b3fc008 (diff)
downloadbrew-19f693d25ba514a6b604128474763e83de55b548.tar.bz2
Port audit_desc rules to cop
Diffstat (limited to 'Library/Homebrew/test/dev-cmd/audit_spec.rb')
-rw-r--r--Library/Homebrew/test/dev-cmd/audit_spec.rb30
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