From 797a07d55503388d2ea1e70c2f0ae922138aac31 Mon Sep 17 00:00:00 2001 From: lionellloh Date: Sun, 12 Jul 2020 13:18:30 +0800 Subject: [PATCH] All tests adapted to pass --- Library/Homebrew/dev-cmd/audit.rb | 2 +- Library/Homebrew/formula.rb | 2 +- Library/Homebrew/test/dev-cmd/audit_spec.rb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 961f64d3d1..176aae7720 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -337,7 +337,7 @@ module Homebrew end if non_standard_licenses.present? - problem "Formula #{formula.name} contains non standard SPDX license: #{non_standard_licenses} " + problem "Formula #{formula.name} contains non standard SPDX license: #{non_standard_licenses}." end return unless @online diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 38896711bf..4cb64c7add 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2216,7 +2216,7 @@ class Formula if args.nil? return @licenses else - @licenses = Array(args) + @licenses = Array(args) unless args == "" puts @licenses # license. end diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 9c78bde60f..368550c320 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -120,7 +120,7 @@ module Homebrew RUBY fa.audit_license - expect(fa.problems.first).to match "#{custom_spdx_id} is not a standard SPDX license." + expect(fa.problems.first).to match "Formula foo contains non standard SPDX license: [\"zzz\"]." end it "verifies that a license info is a standard spdx id" do @@ -160,8 +160,8 @@ module Homebrew RUBY fa.audit_license - expect(fa.problems.first).to match "License mismatch - GitHub license is: GPL-3.0, "\ - "but Formulae license states: #{standard_mismatch_spdx_id}." + expect(fa.problems.first).to match "License mismatch - GitHub license is: [\"GPL-3.0\"], "\ + "but Formulae license states: #{Array(standard_mismatch_spdx_id)}." end end