summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/java/maven_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/integration/java/maven_spec.rb b/spec/integration/java/maven_spec.rb
index 8d1ad20..dbcfa5e 100644
--- a/spec/integration/java/maven_spec.rb
+++ b/spec/integration/java/maven_spec.rb
@@ -27,4 +27,22 @@ RSpec.describe "maven" do
expect(report[:dependencies]).to match_array([{ name: 'mvn-spike', url: '', description: '', paths: ['.'], licenses: ['MIT'] }])
end
end
+
+ describe "When using the `SETUP_CMD`" do
+ it 'executes the custom script' do
+ runner.add_file('custom.sh') do
+ <<~SCRIPT
+ #!/bin/bash -l
+
+ echo 'hello'
+ SCRIPT
+ end
+
+ report = runner.scan(env: {
+ 'SETUP_CMD' => 'bash custom.sh'
+ })
+
+ expect(report).to match_schema(version: '2.0')
+ end
+ end
end