diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/rubocops/lines_cop_spec.rb | 17 |
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" |
