aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMike McQuaid2017-12-02 17:22:14 +0000
committerGitHub2017-12-02 17:22:14 +0000
commit780e86904beff771e9f7e90fa9e53dd9dc4aeeaf (patch)
tree0253e150dbe91572867104116fb222bce826bc91 /Library/Homebrew/test
parente3a8f815b358e031895dba5a376abe5d20fe28dc (diff)
parentfb85ed01bc170e389dd62a2a2872d962b7dad5a6 (diff)
downloadbrew-780e86904beff771e9f7e90fa9e53dd9dc4aeeaf.tar.bz2
Merge pull request #3518 from GauthamGoli/audit_bug_fix
lines_cop: Convert ARGV audit to negative look ahead
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/rubocops/lines_cop_spec.rb4
1 files changed, 2 insertions, 2 deletions
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