lines_cop_spec: add test for ENV.universal_binary audit exemption for wine

This commit is contained in:
JCount 2017-10-08 21:46:32 -04:00
parent e882ce1919
commit ca52eee2ad

View File

@ -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"