diff options
| author | mo khan <mo.khan@gmail.com> | 2020-02-24 09:59:15 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-02-24 16:41:50 -0700 |
| commit | 39afdc40296871d9f7c1732ff3f7e1e3b7b28bbe (patch) | |
| tree | 8f547ce1077b89c732411fc28c4a9efa6730ceca /spec/integration/ruby/bundler_spec.rb | |
| parent | 525d7cb9a30bb14306d6a00919dc25313c632b64 (diff) | |
Exclude development/test dependenciesv2.5.2
* Remove develoment and test dependencies from java-maven fixtures
* Ensure that ruby projects with bundler 2.0 are scannable
* Update CHANGELOG
* Assign @errors ivar for error message
* Remove --cache-from
* Use default ruby and install bundler conservatively
* Install gems to local path
* Add --no-prepare when gems are installed
* Print ruby, rubygems and bundler version
Diffstat (limited to 'spec/integration/ruby/bundler_spec.rb')
| -rw-r--r-- | spec/integration/ruby/bundler_spec.rb | 41 |
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 |
