From 404fa217515b7f5f5340f0db131c638fdb0fe17e Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 13 Jan 2020 19:46:36 -0700 Subject: Add scan of .NET Core sample project --- spec/integration/dotnet/examples_spec.rb | 13 +++++++++++++ spec/support/integration_test_helper.rb | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 spec/integration/dotnet/examples_spec.rb (limited to 'spec') diff --git a/spec/integration/dotnet/examples_spec.rb b/spec/integration/dotnet/examples_spec.rb new file mode 100644 index 0000000..aa2a757 --- /dev/null +++ b/spec/integration/dotnet/examples_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +RSpec.describe ".NET Core" do + it 'scans https://github.com/microsoft/RockPaperScissorsLizardSpock.git' do + runner.clone('https://github.com/microsoft/RockPaperScissorsLizardSpock.git') + report = runner.scan + + expect(report).not_to be_empty + expect(report[:licenses].count).not_to be_zero + expect(report[:dependencies].count).not_to be_zero + end +end + diff --git a/spec/support/integration_test_helper.rb b/spec/support/integration_test_helper.rb index df75176..485af1b 100644 --- a/spec/support/integration_test_helper.rb +++ b/spec/support/integration_test_helper.rb @@ -11,6 +11,10 @@ module IntegrationTestHelper IO.write(full_path, block_given? ? yield : content) end + def clone(repo) + execute({}, "git clone #{repo} #{project_path}") + end + def scan(env: {}) return {} unless execute(env, './bin/test-local', project_path) -- cgit v1.2.3