aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_cmd_audit.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_cmd_audit.rb b/Library/Homebrew/test/test_cmd_audit.rb
index 118dba544..cc10cdee9 100644
--- a/Library/Homebrew/test/test_cmd_audit.rb
+++ b/Library/Homebrew/test/test_cmd_audit.rb
@@ -156,6 +156,23 @@ class FormulaAuditorTests < Homebrew::TestCase
fa.problems
end
+ def test_audit_file_strict_resource_placement
+ fa = formula_auditor "foo", <<-EOS.undent, :strict => true
+ class Foo < Formula
+ url "https://example.com/foo-1.0.tgz"
+
+ resource "foo2" do
+ url "https://example.com/foo-2.0.tgz"
+ end
+
+ depends_on "openssl"
+ end
+ EOS
+ fa.audit_file
+ assert_equal ["`depends_on` (line 8) should be put before `resource` (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