diff options
| author | Mike McQuaid | 2017-04-24 10:06:41 +0100 |
|---|---|---|
| committer | GitHub | 2017-04-24 10:06:41 +0100 |
| commit | ceb1629ad7aeec4c9e9c264efb29b59a96f8556c (patch) | |
| tree | d7fb1f9379f58d15deea3af428d9232970c23bee /Library/Homebrew/test/dev-cmd | |
| parent | cf01485318ba8be4785cf04c35ae30e20e0e1177 (diff) | |
| parent | 413a7e5daebb93f75f8b4839dfd61e42d49b070e (diff) | |
| download | brew-ceb1629ad7aeec4c9e9c264efb29b59a96f8556c.tar.bz2 | |
Merge pull request #2465 from GauthamGoli/audit_components_port_rubocop
audit: audit_components method to rubocops and tests
Diffstat (limited to 'Library/Homebrew/test/dev-cmd')
| -rw-r--r-- | Library/Homebrew/test/dev-cmd/audit_spec.rb | 94 |
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 d07d9d72b..9afb7954a 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -148,100 +148,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 |
