diff options
| author | Can Eldem <celdem@gitlab.com> | 2020-07-09 09:54:37 +0000 |
|---|---|---|
| committer | Can Eldem <celdem@gitlab.com> | 2020-07-09 09:54:37 +0000 |
| commit | d3f219ae8c6ffe9bcbfd6d3409d72a1c9819ee2c (patch) | |
| tree | 1fcbd31252636d7ff7ceed6f59639a1a9ec2b62f /spec/integration/ruby/bundler_spec.rb | |
| parent | 6f05f7b73defa1e51643a5ab4935d2b4120e3ef4 (diff) | |
| parent | b4a36141a7cbbf52b470739a9b0580cf51863a6c (diff) | |
Merge branch 'gems-lock' into 'master'v3.15.0
Detect gems.rb and gems.locked
See merge request gitlab-org/security-products/license-management!186
Diffstat (limited to 'spec/integration/ruby/bundler_spec.rb')
| -rw-r--r-- | spec/integration/ruby/bundler_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/integration/ruby/bundler_spec.rb b/spec/integration/ruby/bundler_spec.rb index 6961067..30cf776 100644 --- a/spec/integration/ruby/bundler_spec.rb +++ b/spec/integration/ruby/bundler_spec.rb @@ -127,4 +127,17 @@ RSpec.describe "bundler" do expect(subject.licenses_for('net-hippie')).to match_array(['MIT']) end end + + context "when scanning a projects with a gems.lock" do + before do + runner.mount(dir: fixture_file('ruby/bundler-v2.1-gems.lock')) + end + + specify do + expect(subject).to match_schema + expect(subject[:licenses]).not_to be_empty + expect(subject.dependency_names).to include('spandx') + expect(subject.licenses_for('spandx')).to match_array(['MIT']) + end + end end |
