From fb85ed01bc170e389dd62a2a2872d962b7dad5a6 Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Sat, 2 Dec 2017 17:03:11 +0530 Subject: lines_cop: Convert ARGV audit to negative look ahead --- Library/Homebrew/test/rubocops/lines_cop_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/rubocops/lines_cop_spec.rb b/Library/Homebrew/test/rubocops/lines_cop_spec.rb index de79fd7de..0d2146339 100644 --- a/Library/Homebrew/test/rubocops/lines_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/lines_cop_spec.rb @@ -541,13 +541,12 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do end it "Using ARGV to check options" do - expect_offense(<<~RUBY) + expect_no_offenses(<<~RUBY) class Foo < Formula desc "foo" url 'http://example.com/foo-1.0.tgz' def install verbose = ARGV.verbose? - ^^^^^^^^^^^^^ Use build instead of ARGV to check options end end RUBY @@ -739,6 +738,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do test do head = ARGV.include? "--HEAD" ^^^^^^ Use "if build.head?" instead + ^^^^ Use build instead of ARGV to check options end end RUBY -- cgit v1.2.3