summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-13 10:00:13 -0600
committermo khan <mo.khan@gmail.com>2020-04-13 10:00:13 -0600
commit6d0f31334989b86df730aa7a705677643e920942 (patch)
tree9f913b38b1ee173224c3bcad5db36a243ef9a462 /spec/unit
parentcd399214d15000ffa530042c57e66e7716618d20 (diff)
Extract map_from method
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/dotnet/nuget_gateway_spec.rb2
-rw-r--r--spec/unit/ruby/parsers/gemfile_lock_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/dotnet/nuget_gateway_spec.rb b/spec/unit/dotnet/nuget_gateway_spec.rb
index fe7fc10..1a4bd55 100644
--- a/spec/unit/dotnet/nuget_gateway_spec.rb
+++ b/spec/unit/dotnet/nuget_gateway_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Spandx::Dotnet::NugetGateway do
describe '#licenses_for' do
context 'when the package specifies the license using an expression' do
- let(:dependency) { double(name: 'jive', version: '0.1.0') }
+ let(:dependency) { instance_double(::Spandx::Core::Dependency, name: 'jive', version: '0.1.0') }
specify do
VCR.use_cassette('jive-0.1.0') do
diff --git a/spec/unit/ruby/parsers/gemfile_lock_spec.rb b/spec/unit/ruby/parsers/gemfile_lock_spec.rb
index c0c9224..57fb8da 100644
--- a/spec/unit/ruby/parsers/gemfile_lock_spec.rb
+++ b/spec/unit/ruby/parsers/gemfile_lock_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe Spandx::Ruby::Parsers::GemfileLock do
specify { expect(spandx.name).to eql('spandx') }
specify { expect(spandx.version).to eql(Spandx::VERSION) }
- specify { expect(spandx.meta[:dependencies].map(&:name)).to match_array(["addressable", "bundler", "net-hippie", "nokogiri", "thor", "zeitwerk"]) }
+ specify { expect(spandx.meta[:dependencies].map(&:name)).to match_array(%w[addressable bundler net-hippie nokogiri thor zeitwerk]) }
specify { expect(spandx.meta[:platform]).to eql('ruby') }
specify { expect(spandx.meta[:source]).to be_a_kind_of(Bundler::Source) }
end