Simplify SPDX test.
This commit is contained in:
parent
0d5e291fe1
commit
9d415e22da
@ -33,17 +33,12 @@ describe SPDX do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe ".download_latest_license_data!", :needs_network do
|
describe ".download_latest_license_data!", :needs_network do
|
||||||
let(:tmp_json_path) { Pathname.new(TEST_TMPDIR) }
|
let(:download_dir) { mktmpdir }
|
||||||
|
|
||||||
after do
|
|
||||||
FileUtils.rm_f tmp_json_path/"spdx_licenses.json"
|
|
||||||
FileUtils.rm_f tmp_json_path/"spdx_exceptions.json"
|
|
||||||
end
|
|
||||||
|
|
||||||
it "downloads latest license data" do
|
it "downloads latest license data" do
|
||||||
described_class.download_latest_license_data! to: tmp_json_path
|
described_class.download_latest_license_data! to: download_dir
|
||||||
expect(tmp_json_path/"spdx_licenses.json").to exist
|
expect(download_dir/"spdx_licenses.json").to exist
|
||||||
expect(tmp_json_path/"spdx_exceptions.json").to exist
|
expect(download_dir/"spdx_exceptions.json").to exist
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user