Skip to content

Commit

Permalink
Merge pull request #14980 from reitermarkus/spdx-test
Browse files Browse the repository at this point in the history
Simplify SPDX test.
  • Loading branch information
MikeMcQuaid committed Mar 15, 2023
2 parents 65bfc62 + 9d415e2 commit 78e5bd5
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Library/Homebrew/test/utils/spdx_spec.rb
Expand Up @@ -33,17 +33,12 @@
end

describe ".download_latest_license_data!", :needs_network do
let(:tmp_json_path) { Pathname.new(TEST_TMPDIR) }

after do
FileUtils.rm_f tmp_json_path/"spdx_licenses.json"
FileUtils.rm_f tmp_json_path/"spdx_exceptions.json"
end
let(:download_dir) { mktmpdir }

it "downloads latest license data" do
described_class.download_latest_license_data! to: tmp_json_path
expect(tmp_json_path/"spdx_licenses.json").to exist
expect(tmp_json_path/"spdx_exceptions.json").to exist
described_class.download_latest_license_data! to: download_dir
expect(download_dir/"spdx_licenses.json").to exist
expect(download_dir/"spdx_exceptions.json").to exist
end
end

Expand Down

0 comments on commit 78e5bd5

Please sign in to comment.