lines_cop_spec: add test for ENV.universal_binary audit exemption for wine
This commit is contained in:
parent
e882ce1919
commit
ca52eee2ad
@ -419,7 +419,22 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
|
|||||||
end
|
end
|
||||||
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
|
source = <<-EOS.undent
|
||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
desc "foo"
|
desc "foo"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user