summaryrefslogtreecommitdiff
path: root/spec/integration/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/ruby')
-rw-r--r--spec/integration/ruby/bundler_spec.rb41
1 files changed, 40 insertions, 1 deletions
diff --git a/spec/integration/ruby/bundler_spec.rb b/spec/integration/ruby/bundler_spec.rb
index 2cb8f7d..d9b9c85 100644
--- a/spec/integration/ruby/bundler_spec.rb
+++ b/spec/integration/ruby/bundler_spec.rb
@@ -13,7 +13,6 @@ gem 'saml-kit'
end
report = runner.scan
- expect(report).not_to be_empty
expect(report).to match_schema(version: '2.0')
expect(report[:licenses]).not_to be_empty
expect(report[:dependencies].map { |x| x[:name] }).to include("saml-kit")
@@ -87,4 +86,44 @@ BUNDLED WITH
expect(report[:dependencies].map { |x| x[:name] }).to include("saml-kit")
end
end
+
+ context "when a project depends on bundler `~> 2.0`" do
+ it 'produces a valid report' do
+ runner.add_file('Gemfile') do
+ <<~RAW
+source 'https://rubygems.org'
+
+gem 'net-hippie'
+ RAW
+ end
+ runner.add_file('Gemfile.lock') do
+ <<~RAW
+GEM
+ remote: https://rubygems.org/
+ specs:
+ net-hippie (0.3.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ net-hippie
+
+BUNDLED WITH
+ 2.1.4
+ RAW
+ end
+
+ report = runner.scan
+ expect(report).to match_schema(version: '2.0')
+ expect(report[:licenses]).not_to be_empty
+ expect(find_in(report, 'net-hippie')).to eql({
+ name: 'net-hippie',
+ description: "net/http for hippies. ☮️",
+ url: "https://github.com/mokhan/net-hippie/",
+ paths: ['.'],
+ licenses: ['MIT']
+ })
+ end
+ end
end