aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/dev-cmd/audit_spec.rb
diff options
context:
space:
mode:
authorGautham Goli2017-04-08 15:10:44 +0530
committerGautham Goli2017-04-22 21:53:16 +0530
commit413a7e5daebb93f75f8b4839dfd61e42d49b070e (patch)
treeaadfe978623102594682262ff27e5bffc286b057 /Library/Homebrew/test/dev-cmd/audit_spec.rb
parent044bd974e435dabfebf5385cb5649f8ddb34de94 (diff)
downloadbrew-413a7e5daebb93f75f8b4839dfd61e42d49b070e.tar.bz2
Port audit_components method to rubocops and add corresponding tests
Diffstat (limited to 'Library/Homebrew/test/dev-cmd/audit_spec.rb')
-rw-r--r--Library/Homebrew/test/dev-cmd/audit_spec.rb94
1 files changed, 0 insertions, 94 deletions
diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb
index 8a8096849..c0a090b29 100644
--- a/Library/Homebrew/test/dev-cmd/audit_spec.rb
+++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -141,100 +141,6 @@ describe FormulaAuditor do
fa.audit_file
expect(fa.problems).to eq([])
end
-
- specify "strict: ordering issue" do
- fa = formula_auditor "foo", <<-EOS.undent, strict: true
- class Foo < Formula
- url "http://example.com/foo-1.0.tgz"
- homepage "http://example.com"
- end
- EOS
-
- fa.audit_file
- expect(fa.problems)
- .to eq(["`homepage` (line 3) should be put before `url` (line 2)"])
- end
-
- specify "strict: resource placement" do
- fa = formula_auditor "foo", <<-EOS.undent, strict: true
- class Foo < Formula
- url "https://example.com/foo-1.0.tgz"
-
- resource "foo2" do
- url "https://example.com/foo-2.0.tgz"
- end
-
- depends_on "openssl"
- end
- EOS
-
- fa.audit_file
- expect(fa.problems)
- .to eq(["`depends_on` (line 8) should be put before `resource` (line 4)"])
- end
-
- specify "strict: plist placement" do
- fa = formula_auditor "foo", <<-EOS.undent, strict: true
- class Foo < Formula
- url "https://example.com/foo-1.0.tgz"
-
- test do
- expect(shell_output("./dogs")).to match("Dogs are terrific")
- end
-
- def plist
- end
- end
- EOS
-
- fa.audit_file
- expect(fa.problems)
- .to eq(["`plist block` (line 8) should be put before `test block` (line 4)"])
- end
-
- specify "strict: url outside of stable block" do
- fa = formula_auditor "foo", <<-EOS.undent, strict: true
- class Foo < Formula
- url "http://example.com/foo-1.0.tgz"
- stable do
- # stuff
- end
- end
- EOS
-
- fa.audit_file
- expect(fa.problems).to eq(["`url` should be put inside `stable block`"])
- end
-
- specify "strict: head and head do" do
- fa = formula_auditor "foo", <<-EOS.undent, strict: true
- class Foo < Formula
- head "http://example.com/foo.git"
- head do
- # stuff
- end
- end
- EOS
-
- fa.audit_file
- expect(fa.problems).to eq(["Should not have both `head` and `head do`"])
- end
-
- specify "strict: bottle and bottle do" do
- fa = formula_auditor "foo", <<-EOS.undent, strict: true
- class Foo < Formula
- url "http://example.com/foo-1.0.tgz"
- bottle do
- # bottles go here
- end
- bottle :unneeded
- end
- EOS
-
- fa.audit_file
- expect(fa.problems)
- .to eq(["Should not have `bottle :unneeded/:disable` and `bottle do`"])
- end
end
describe "#audit_class" do