summaryrefslogtreecommitdiff
path: root/spec/support/shared.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared.rb')
-rw-r--r--spec/support/shared.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/shared.rb b/spec/support/shared.rb
index ce9f2c2..049191e 100644
--- a/spec/support/shared.rb
+++ b/spec/support/shared.rb
@@ -4,8 +4,11 @@ RSpec.shared_examples "each report version" do |language, package_manager, branc
let(:url) { "https://gitlab.com/gitlab-org/security-products/tests/#{language}-#{package_manager}.git" }
let(:expected_content) { JSON.parse(fixture_file_content("expected/#{language}/#{package_manager}/v#{version}.json")) }
- it 'matches the expected report' do
+ before do
runner.clone(url, branch: branch)
+ end
+
+ it 'matches the expected report' do
actual = runner.scan(env: { 'LM_REPORT_VERSION' => version })
expect(JSON.pretty_generate(actual)).to eq(JSON.pretty_generate(expected_content))