From 776a73da7c4b92c73dea3e5065ea4b2d9873f029 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Mon, 4 Apr 2016 17:17:06 +0100 Subject: test_cmd_audit: add plist test --- Library/Homebrew/test/test_cmd_audit.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/test/test_cmd_audit.rb b/Library/Homebrew/test/test_cmd_audit.rb index 1f35e33b5..0a441764f 100644 --- a/Library/Homebrew/test/test_cmd_audit.rb +++ b/Library/Homebrew/test/test_cmd_audit.rb @@ -173,6 +173,24 @@ class FormulaAuditorTests < Homebrew::TestCase fa.problems end + def test_audit_file_strict_plist_placement + fa = formula_auditor "foo", <<-EOS.undent, :strict => true + class Foo < Formula + url "https://example.com/foo-1.0.tgz" + + test do + assert_match "Dogs are terrific", shell_output("./dogs") + end + + def plist + end + end + EOS + fa.audit_file + assert_equal ["`plist block` (line 8) should be put before `test block` (line 4)"], + fa.problems + end + def test_audit_file_strict_url_outside_of_stable_block fa = formula_auditor "foo", <<-EOS.undent, :strict => true class Foo < Formula -- cgit v1.2.3