diff options
Diffstat (limited to 'Library/Homebrew/test/dev-cmd/audit_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/dev-cmd/audit_spec.rb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 3e99bd06b..8dd3aee72 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -18,7 +18,7 @@ describe FormulaText do def formula_text(name, body = nil, options = {}) path = dir/"#{name}.rb" - path.write <<-EOS.undent + path.write <<~EOS class #{Formulary.class_s(name)} < Formula #{body} end @@ -29,7 +29,7 @@ describe FormulaText do end specify "simple valid Formula" do - ft = formula_text "valid", <<-EOS.undent + ft = formula_text "valid", <<~EOS url "http://www.example.com/valid-1.0.tar.gz" EOS @@ -49,7 +49,7 @@ describe FormulaText do end specify "#data?" do - ft = formula_text "data", <<-EOS.undent + ft = formula_text "data", <<~EOS patch :DATA EOS @@ -77,7 +77,7 @@ describe FormulaAuditor do describe "#problems" do it "is empty by default" do - fa = formula_auditor "foo", <<-EOS.undent + fa = formula_auditor "foo", <<~EOS class Foo < Formula url "http://example.com/foo-1.0.tgz" end @@ -91,7 +91,7 @@ describe FormulaAuditor do specify "file permissions" do allow(File).to receive(:umask).and_return(022) - fa = formula_auditor "foo", <<-EOS.undent + fa = formula_auditor "foo", <<~EOS class Foo < Formula url "http://example.com/foo-1.0.tgz" end @@ -106,7 +106,7 @@ describe FormulaAuditor do end specify "DATA but no __END__" do - fa = formula_auditor "foo", <<-EOS.undent + fa = formula_auditor "foo", <<~EOS class Foo < Formula url "http://example.com/foo-1.0.tgz" patch :DATA @@ -118,7 +118,7 @@ describe FormulaAuditor do end specify "__END__ but no DATA" do - fa = formula_auditor "foo", <<-EOS.undent + fa = formula_auditor "foo", <<~EOS class Foo < Formula url "http://example.com/foo-1.0.tgz" end @@ -138,7 +138,7 @@ describe FormulaAuditor do end specify "no issue" do - fa = formula_auditor "foo", <<-EOS.undent + fa = formula_auditor "foo", <<~EOS class Foo < Formula url "http://example.com/foo-1.0.tgz" homepage "http://example.com" @@ -152,7 +152,7 @@ describe FormulaAuditor do describe "#line_problems" do specify "pkgshare" do - fa = formula_auditor "foo", <<-EOS.undent, strict: true + fa = formula_auditor "foo", <<~EOS, strict: true class Foo < Formula url "http://example.com/foo-1.0.tgz" end @@ -184,7 +184,7 @@ describe FormulaAuditor do # Formulae with "++" in their name would break various audit regexps: # Error: nested *?+ in regexp: /^libxml++3\s/ specify "++ in name" do - fa = formula_auditor "foolibc++", <<-EOS.undent, strict: true + fa = formula_auditor "foolibc++", <<~EOS, strict: true class Foolibcxx < Formula desc "foolibc++ is a test" url "http://example.com/foo-1.0.tgz" @@ -205,7 +205,7 @@ describe FormulaAuditor do specify "#audit_github_repository when HOMEBREW_NO_GITHUB_API is set" do ENV["HOMEBREW_NO_GITHUB_API"] = "1" - fa = formula_auditor "foo", <<-EOS.undent, strict: true, online: true + fa = formula_auditor "foo", <<~EOS, strict: true, online: true class Foo < Formula homepage "https://github.com/example/example" url "http://example.com/foo-1.0.tgz" @@ -219,7 +219,7 @@ describe FormulaAuditor do describe "#audit_keg_only_style" do specify "keg_only_needs_downcasing" do - fa = formula_auditor "foo", <<-EOS.undent, strict: true + fa = formula_auditor "foo", <<~EOS, strict: true class Foo < Formula url "http://example.com/foo-1.0.tgz" @@ -233,7 +233,7 @@ describe FormulaAuditor do end specify "keg_only_redundant_period" do - fa = formula_auditor "foo", <<-EOS.undent, strict: true + fa = formula_auditor "foo", <<~EOS, strict: true class Foo < Formula url "http://example.com/foo-1.0.tgz" @@ -247,11 +247,11 @@ describe FormulaAuditor do end specify "keg_only_handles_block_correctly" do - fa = formula_auditor "foo", <<-EOS.undent, strict: true + fa = formula_auditor "foo", <<~EOS, strict: true class Foo < Formula url "http://example.com/foo-1.0.tgz" - keg_only <<-EOF.undent + keg_only <<~EOF this line starts with a lowercase word. This line does not but that shouldn't be a @@ -266,7 +266,7 @@ describe FormulaAuditor do end specify "keg_only_handles_whitelist_correctly" do - fa = formula_auditor "foo", <<-EOS.undent, strict: true + fa = formula_auditor "foo", <<~EOS, strict: true class Foo < Formula url "http://example.com/foo-1.0.tgz" @@ -290,7 +290,7 @@ describe FormulaAuditor do before(:each) do @foo_version = Count.increment - origin_formula_path.write <<-EOS.undent + origin_formula_path.write <<~EOS class Foo#{@foo_version} < Formula url "https://example.com/foo-1.0.tar.gz" revision 2 |
