summaryrefslogtreecommitdiff
path: root/spec/unit/dotnet
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/dotnet')
-rw-r--r--spec/unit/dotnet/index_spec.rb2
-rw-r--r--spec/unit/dotnet/parsers/csproj_spec.rb22
-rw-r--r--spec/unit/dotnet/parsers/sln_spec.rb2
3 files changed, 13 insertions, 13 deletions
diff --git a/spec/unit/dotnet/index_spec.rb b/spec/unit/dotnet/index_spec.rb
index 2a873de..50e1ed1 100644
--- a/spec/unit/dotnet/index_spec.rb
+++ b/spec/unit/dotnet/index_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.describe Spandx::Dotnet::Index do
- subject { described_class.new(directory: directory, gateway: gateway) }
+ subject { described_class.new(directory:, gateway:) }
let(:gateway) { instance_double(Spandx::Dotnet::NugetGateway) }
let(:directory) { Dir.mktmpdir('spandx') }
diff --git a/spec/unit/dotnet/parsers/csproj_spec.rb b/spec/unit/dotnet/parsers/csproj_spec.rb
index 940b6c8..b0cac3b 100644
--- a/spec/unit/dotnet/parsers/csproj_spec.rb
+++ b/spec/unit/dotnet/parsers/csproj_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Spandx::Dotnet::Parsers::Csproj do
subject(:described_instance) { described_class.new }
def build(name, version, path)
- Spandx::Core::Dependency.new(name: name, version: version, path: path)
+ Spandx::Core::Dependency.new(name:, version:, path:)
end
describe '#parse' do
@@ -15,29 +15,29 @@ RSpec.describe Spandx::Dotnet::Parsers::Csproj do
let(:jive) { subject.find { |item| item.name == 'jive' } }
- specify { expect(subject).to match_array([build('jive', '0.1.0', file)]) }
+ it { is_expected.to match_array([build('jive', '0.1.0', file)]) }
end
context 'when parsing a .csproj file that has a reference to another project' do
subject { described_instance.parse(fixture_file('nuget/nested/test.csproj')) }
- specify { expect(subject.map(&:name)).to match_array(%w[jive xunit]) }
+ it { expect(subject.map(&:name)).to match_array(%w[jive xunit]) }
end
context 'when parsing `Nancy.Hosting.Self.csproj`' do
subject { described_instance.parse(fixture_file('nuget/Nancy.Hosting.Self.csproj')) }
- specify { expect(subject.count).to be(1) }
- specify { expect(subject[0].name).to eql('System.Security.Principal.Windows') }
- specify { expect(subject[0].version).to eql('4.3.0') }
+ it { expect(subject.count).to be(1) }
+ it { expect(subject[0].name).to eql('System.Security.Principal.Windows') }
+ it { expect(subject[0].version).to eql('4.3.0') }
end
end
describe '#match?' do
- specify { is_expected.to be_match(to_path('/root/Packages.props')) }
- specify { is_expected.to be_match(to_path('/root/simple.csproj')) }
- specify { is_expected.not_to be_match(to_path('/root/simple.sln')) }
- specify { is_expected.to be_match(to_path('C:\Documents and Settings\hello world.csproj')) }
- specify { is_expected.to be_match(to_path('C:\Documents and Settings\simple.csproj')) }
+ it { is_expected.to be_match(to_path('/root/Packages.props')) }
+ it { is_expected.to be_match(to_path('/root/simple.csproj')) }
+ it { is_expected.not_to be_match(to_path('/root/simple.sln')) }
+ it { is_expected.to be_match(to_path('C:\Documents and Settings\hello world.csproj')) }
+ it { is_expected.to be_match(to_path('C:\Documents and Settings\simple.csproj')) }
end
end
diff --git a/spec/unit/dotnet/parsers/sln_spec.rb b/spec/unit/dotnet/parsers/sln_spec.rb
index 50b86d7..0effd8a 100644
--- a/spec/unit/dotnet/parsers/sln_spec.rb
+++ b/spec/unit/dotnet/parsers/sln_spec.rb
@@ -2,7 +2,7 @@
RSpec.describe Spandx::Dotnet::Parsers::Sln do
def build(name, version, path)
- Spandx::Core::Dependency.new(name: name, version: version, path: path)
+ Spandx::Core::Dependency.new(name:, version:, path:)
end
describe '#parse' do