diff options
| author | Gautham Goli | 2017-09-04 13:47:05 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-09-04 23:43:42 +0530 |
| commit | 4ec26aea4025d19e70cdf59da6dfd7be3a389e44 (patch) | |
| tree | 93e8e09c078c364c5ab513df59d86924e0ac1d8c /Library/Homebrew/test/dev-cmd/audit_spec.rb | |
| parent | e77701075606cbcf3075d7fcc123556b63977bcf (diff) | |
| download | brew-4ec26aea4025d19e70cdf59da6dfd7be3a389e44.tar.bz2 | |
audit: Port audit_class to rubocop, add tests and autocorrect
Diffstat (limited to 'Library/Homebrew/test/dev-cmd/audit_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/dev-cmd/audit_spec.rb | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 037865fdf..3e99bd06b 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -150,70 +150,6 @@ describe FormulaAuditor do end end - describe "#audit_class" do - specify "missing test" do - fa = formula_auditor "foo", <<-EOS.undent - class Foo < Formula - url "http://example.com/foo-1.0.tgz" - end - EOS - - fa.audit_class - expect(fa.problems).to eq([]) - - fa = formula_auditor "foo", <<-EOS.undent, strict: true - class Foo < Formula - url "http://example.com/foo-1.0.tgz" - end - EOS - - fa.audit_class - expect(fa.problems).to eq(["A `test do` test block should be added"]) - end - - specify "GithubGistFormula", :needs_compat do - ENV.delete("HOMEBREW_DEVELOPER") - - fa = formula_auditor "foo", <<-EOS.undent - class Foo < GithubGistFormula - url "http://example.com/foo-1.0.tgz" - end - EOS - - fa.audit_class - expect(fa.problems) - .to eq(["GithubGistFormula is deprecated, use Formula instead"]) - end - - specify "ScriptFileFormula", :needs_compat do - ENV.delete("HOMEBREW_DEVELOPER") - - fa = formula_auditor "foo", <<-EOS.undent - class Foo < ScriptFileFormula - url "http://example.com/foo-1.0.tgz" - end - EOS - - fa.audit_class - expect(fa.problems) - .to eq(["ScriptFileFormula is deprecated, use Formula instead"]) - end - - specify "AmazonWebServicesFormula", :needs_compat do - ENV.delete("HOMEBREW_DEVELOPER") - - fa = formula_auditor "foo", <<-EOS.undent - class Foo < AmazonWebServicesFormula - url "http://example.com/foo-1.0.tgz" - end - EOS - - fa.audit_class - expect(fa.problems) - .to eq(["AmazonWebServicesFormula is deprecated, use Formula instead"]) - end - end - describe "#line_problems" do specify "pkgshare" do fa = formula_auditor "foo", <<-EOS.undent, strict: true |
