audit test: modified code for reading json file

This commit is contained in:
lionellloh 2020-06-30 22:08:36 +08:00
parent c50f7b8951
commit ff95f08591

View File

@ -81,12 +81,9 @@ module Homebrew
describe "#audit_license" do
let(:spdx_data) {
full_path = File.join(File.dirname(__FILE__), "../../data/spdx.json")
File.open(full_path, "r") do |f|
JSON.parse(f.read)
end
JSON.parse Pathname(File.join(File.dirname(__FILE__), "../../data/spdx.json")).read
}
let(:custom_spdx_id) { "zzz" }
let(:standard_mismatch_spdx_id) { "0BSD" }