diff options
Diffstat (limited to 'spec/unit/dotnet/parsers/csproj_spec.rb')
| -rw-r--r-- | spec/unit/dotnet/parsers/csproj_spec.rb | 22 |
1 files changed, 11 insertions, 11 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 |
