aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJCount2017-10-08 21:46:32 -0400
committerJCount2017-10-15 10:26:03 -0400
commitca52eee2adbdf272b6f08953e5fe111667df7686 (patch)
treef9cb1fb884f361ded828edb4f711ecab901df27b /Library/Homebrew/test
parente882ce1919997ac9c5ba9b17be9b806f9007540f (diff)
downloadbrew-ca52eee2adbdf272b6f08953e5fe111667df7686.tar.bz2
lines_cop_spec: add test for ENV.universal_binary audit exemption for wine
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/rubocops/lines_cop_spec.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/Library/Homebrew/test/rubocops/lines_cop_spec.rb b/Library/Homebrew/test/rubocops/lines_cop_spec.rb
index 753439c8e..e798db9e3 100644
--- a/Library/Homebrew/test/rubocops/lines_cop_spec.rb
+++ b/Library/Homebrew/test/rubocops/lines_cop_spec.rb
@@ -419,7 +419,22 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
end
end
- it "with ENV.universal_binary" do
+ it "with ENV.universal_binary exempted formula" do
+ source = <<-EOS.undent
+ class Wine < Formula
+ desc "foo"
+ url 'http://example.com/foo-1.0.tgz'
+ if build?
+ ENV.universal_binary
+ end
+ end
+ EOS
+
+ inspect_source(source, "/homebrew-core/Formula/wine.rb")
+ expect(cop.offenses).to eq([])
+ end
+
+ it "with ENV.x11" do
source = <<-EOS.undent
class Foo < Formula
desc "foo"