diff options
| author | Mike McQuaid | 2017-09-05 18:07:25 +0100 |
|---|---|---|
| committer | GitHub | 2017-09-05 18:07:25 +0100 |
| commit | 4cc8d4737b1c87cdc2d2c9e90d80b3b372bb924c (patch) | |
| tree | 10f2bf1d7f5f198247553d28e90259e3ffcf6b10 /Library/Homebrew/test/dev-cmd | |
| parent | c6d5f8cc99981310ea9f2763d9e53eac4eaeef8a (diff) | |
| parent | d45ff9c0fdfa834c55c01f9c95fe18064fabd76a (diff) | |
| download | brew-4cc8d4737b1c87cdc2d2c9e90d80b3b372bb924c.tar.bz2 | |
Merge pull request #2982 from GauthamGoli/audit_class_rubocop_port
audit: Port audit_class to rubocop, add tests and autocorrect
Diffstat (limited to 'Library/Homebrew/test/dev-cmd')
| -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 |
