From b4a36141a7cbbf52b470739a9b0580cf51863a6c Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 8 Jul 2020 11:55:30 -0600 Subject: Detect gems.rb and gems.locked --- spec/integration/ruby/bundler_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec/integration/ruby') 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 -- cgit v1.2.3