summaryrefslogtreecommitdiff
path: root/spec/unit/dotnet/parsers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2024-12-31 11:51:58 -0700
committermo khan <mo@mokhan.ca>2024-12-31 14:40:07 -0700
commit78c6a086164aa83ce2e4e57daadfbdb53a31a37f (patch)
tree2718cbb345bb3c8257ccbaf9e1b8e7913699a3a5 /spec/unit/dotnet/parsers
parent80d59246ec0752128548d6c61a2d44ec498771d7 (diff)
feat: Add support for Ruby 3.2+HEADv0.19.0main
Diffstat (limited to 'spec/unit/dotnet/parsers')
-rw-r--r--spec/unit/dotnet/parsers/csproj_spec.rb22
-rw-r--r--spec/unit/dotnet/parsers/sln_spec.rb2
2 files changed, 12 insertions, 12 deletions
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