aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominyk Tiller2016-04-04 17:17:06 +0100
committerDominyk Tiller2016-04-05 23:57:53 +0100
commit776a73da7c4b92c73dea3e5065ea4b2d9873f029 (patch)
tree68adef34916a1709f186c9b08d8dc98af1019019
parent149334d88d18472dc218ab42791f90c19f53e838 (diff)
downloadbrew-776a73da7c4b92c73dea3e5065ea4b2d9873f029.tar.bz2
test_cmd_audit: add plist test
-rw-r--r--Library/Homebrew/test/test_cmd_audit.rb18
1 files changed, 18 insertions, 0 deletions
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