From 3b32a036bf5aa4497cb4bbeb91c2cacf22f5d146 Mon Sep 17 00:00:00 2001 From: Tetiana Chupryna Date: Fri, 24 Jul 2020 17:33:41 +0300 Subject: Test with separate specs --- normalized-licenses.yml | 1 + spec/integration/python/pip_spec.rb | 30 ++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/normalized-licenses.yml b/normalized-licenses.yml index 2961e06..4df6161 100644 --- a/normalized-licenses.yml +++ b/normalized-licenses.yml @@ -8,6 +8,7 @@ ids: Apache Software License - Version 2.0: Apache-2.0 ASF 2.0: Apache-2.0 ASL, version 2: Apache-2.0 + BSD: bsd BSD 3-Clause: BSD-3-Clause BSD (3 clause): BSD-3-Clause BSD-derived (http://www.repoze.org/LICENSE.txt): BSD-2-Clause diff --git a/spec/integration/python/pip_spec.rb b/spec/integration/python/pip_spec.rb index 84fbd89..cead027 100644 --- a/spec/integration/python/pip_spec.rb +++ b/spec/integration/python/pip_spec.rb @@ -47,14 +47,7 @@ RSpec.describe "pip" do end context 'with BSD licenses dependencies' do - let(:requirements) do - [ - 'webencodings', - 'idna', - 'click', - 'EasyProcess' - ].join("\n") - end + let(:requirements) { %w(webencodings idna click EasyProcess).join("\n") } it 'finds proper versions of BSD license' do runner.add_file('requirements.txt', requirements) @@ -62,8 +55,29 @@ RSpec.describe "pip" do report = runner.scan expect(report.licenses_for('webencodings')).to eq(['BSD']) + end + + it 'finds proper versions of BSD license' do + runner.add_file('requirements.txt', requirements) + + report = runner.scan + expect(report.licenses_for('idna')).to eq(['BSD-like']) + end + + it 'finds proper versions of BSD license' do + runner.add_file('requirements.txt', requirements) + + report = runner.scan + expect(report.licenses_for('click')).to eq(['BSD-3-Clause']) + end + + it 'finds proper versions of BSD license' do + runner.add_file('requirements.txt', requirements) + + report = runner.scan + expect(report.licenses_for('EasyProcess')).to eq(['BSD']) end end -- cgit v1.2.3